var sxca_ceb = {};
var jit_ceb = {};

/*****************************************************************
 为方便JS封装程序调试，这里我们自定义一个测试方法，默认内置在封装
 的方法里，这样可以方便的调试跟踪每个方法的执行情况，方便排查错误
 *****************************************************************/
sxca_ceb.journal = (function () {

    var business = {
        "name": '版式文件盖章',//当前执行业务的名称，这里为默认值，可传参设定
        "currentAction": '获取印章地址',//当前动作名称,这里为默认值，可传参设定
        "info": '执行结果',
        "time": new Date()
    };
    var setBusiness = function (name, currentAction) {
        business.name = name;
        business.currentAction = currentAction;
    };
    var getCurrentTime = function () {
        var currentTime = new Date();
        var currentStr = currentTime.getFullYear() + "-" +
            (currentTime.getMonth() + 1) + "-" +
            currentTime.getDate() + " " +
            currentTime.getHours() + ":" +
            currentTime.getMinutes() + ":" +
            currentTime.getSeconds() + "." +
            currentTime.getMilliseconds();
        return currentStr;

    };
    var setCurrentTime = function () {
        business.time = getCurrentTime();
    };
    var logInfo = function (name, currentAction, info) {
        if (1 == sxca_ceb.switch.getConsoleLogInfo()) {
            setBusiness(name, currentAction);
            setCurrentTime();
            //这里后续需要考虑console.log封装，因为其在IE9以下浏览器存在兼容问题
            console.log("[业务名称]:" + business.name + ",[执行动作]:" + business.currentAction +
                ",[执行结果]:" + info + ",[执行时间]:" + business.time);
        }
    };
    var logDebug = function (info) {
        if (1 == sxca_ceb.switch.getConsoleLogDebug()) {
            setCurrentTime();
            //这里后续需要考虑console.log封装，因为其在IE9以下浏览器存在兼容问题
            console.log(info + ",[执行时间]:" + business.time);
        }
    };
    return {
        logInfo: logInfo,
        logDebug: logDebug,
        getCurrentTime: getCurrentTime
    };
}());
/*****************************************************************
 这里主要是提供给第三方系统用于开关设置，比如是否拖拽
 *****************************************************************/
sxca_ceb.switch = (function () {

    var sealSet = {
        "isDragOn": 1,//0 不能拖拽  1 可以拖拽 2 指定位置后拖拽
        "sealsGetType": 0,//0 证书主题 1.印章名称 2.证书序列号
        "sealOnly": 1, //0 表示同一编号的印章在当前页面可以盖多次， 1表示同一编号的印章在当前页面只能出现一次
        "overlapTip": 2,// 0:允许印章重叠(包括特殊的重合情况)，不提示;1 允许印章重叠(包括特殊的重合情况),会提示;2 不允许印章重叠(包括特殊的重合情况)，会提示，会阻止。
        "currentSealSum": 10,//当前页面待合成印章的个数
        "isLazyLoad": 1,// 0 正常加载  1 懒加载
        "normalSealSum": 10,//普通盖章 当前页面待合成印章个数  初始化时需与currentSealSum一致
        "batchSealSum": 1,//批量盖章  当前页面待合成印章个数
        "pagingSignFirstRateMin": 20,//骑缝章盖章首页比例最小值
        "pagingSignFirstRateMax": 60,//骑缝章盖章首页比例最大值
        "pagingOffset": 0,//客户设置的骑缝章偏移量
        "consoleLogInfo": 0,// 0:不打印，1：打印。
        "consoleLogDebug": 0,// 0:不打印，1：打印。
        "alertTip": 1,// 0:不弹窗，1：弹窗。请谨慎修改
        "allowPrintmeFile": 0,// 0:不允许打印，1：可以打印
        "showDelSealOper": 1,// 0:不显示删除印章，1：显示删除印章
    };
    var setRateMin = function (min) {
        if (typeof min == "number") {
            if (min < 1) {
                sxca_ceb.ui._alert("首页比例最小值初始化错误：请传入不小于1的整数");
            } else {
                sealSet.pagingSignFirstRateMin = min;
            }
        } else {
            sxca_ceb.ui._alert("首页比例最小值初始化错误：请传入数字");
        }
    };
    var setRateMax = function (max) {
        if (typeof max == "number") {
            if (max > 99) {
                sxca_ceb.ui._alert("首页比例初最大值始化错误：请传入不大于99的整数");
            } else {
                sealSet.pagingSignFirstRateMax = max;
            }
        } else {
            sxca_ceb.ui._alert("首页比例初最大值始化错误：请传入数字");
        }
    };
    var setOffset = function (offset) {
        sealSet.pagingOffset = offset;
    };
    var getOffset = function () {
        return sealSet.pagingOffset;
    };
    var getRateMin = function () {
        return sealSet.pagingSignFirstRateMin;
    };
    var getRateMax = function () {
        return sealSet.pagingSignFirstRateMax;
    };
    var setSealDrag = function (isDragOn) {
        sealSet.isDragOn = isDragOn;
        var sureDiv = sxca_ceb.base.getId('sxca_ceb_sure')
        if(sureDiv){
            if (isDragOn == 0) {
                sureDiv.style.display = 'block';
            } else {
                sureDiv.style.display = 'none';
            }
        }
    };
    var getSealDrag = function () {
        return sealSet.isDragOn;
    };
    var setSealsGetType = function (sealsGetType) {
        sealSet.sealsGetType = sealsGetType;
    };
    var getSealsGetType = function () {
        return sealSet.sealsGetType;
    };
    var getShowDelSealOper = function () {
        return sealSet.showDelSealOper;
    };
    var setShowDelSealOper = function (showDelSealOper) {
        sealSet.showDelSealOper = showDelSealOper;
    };
    var getSealOnly = function () {
        return sealSet.sealOnly;
    };
    var setSealOnly = function (sealOnly) {
        sealSet.sealOnly = sealOnly;
    };
    var getOverlapTip = function () {
        return sealSet.overlapTip;
    }
    var getCurrentSealSum = function () {
        return sealSet.currentSealSum;
    };
    var getLazyLoad = function () {
        return sealSet.isLazyLoad;
    };
    var setSignTypeNormal = function () {
        sealSet.currentSealSum = sealSet.normalSealSum;
    };
    var setSignTypeBatch = function () {
        sealSet.currentSealSum = sealSet.batchSealSum;
    };
    var setConsoleLogInfo = function (consoleLogInfo) {
        sealSet.consoleLogInfo = consoleLogInfo;
        return consoleLogInfo;
    };
    var getConsoleLogInfo = function () {
        return sealSet.consoleLogInfo;

    };
    var setConsoleLogDebug = function (consoleLogDebug) {
        sealSet.consoleLogDebug = consoleLogDebug;
        return consoleLogDebug;
    };
    var getConsoleLogDebug = function () {
        return sealSet.consoleLogDebug;
    };
    var setAlertTip = function (alertTip) {
        sealSet.alertTip = alertTip;
    };
    var getAlertTip = function () {
        return sealSet.alertTip;
    };
    var setAllowPrintmeFile = function (allowOper) {
        sealSet.allowPrintmeFile = allowOper;
        if (allowOper == 0) {
            sxca_ceb.base.getId('printme_file').style.display = 'none';
        } else {
            sxca_ceb.base.getId('printme_file').style.display = 'block';
        }
    };
    var getAllowPrintmeFile = function () {
        return sealSet.allowPrintmeFile;
    };

    return {
        setSealDrag: setSealDrag,
        setRateMin: setRateMin,
        setOffset: setOffset,
        getOffset: getOffset,
        setRateMax: setRateMax,
        getRateMin: getRateMin,
        getRateMax: getRateMax,
        getSealDrag: getSealDrag,
        setSealsGetType: setSealsGetType,
        getSealsGetType: getSealsGetType,
        getSealOnly: getSealOnly,
        getShowDelSealOper: getShowDelSealOper,
        setShowDelSealOper: setShowDelSealOper,
        getOverlapTip: getOverlapTip,
        setSealOnly: setSealOnly,
        getLazyLoad: getLazyLoad,
        setSignTypeNormal: setSignTypeNormal,
        setSignTypeBatch: setSignTypeBatch,
        getCurrentSealSum: getCurrentSealSum,
        setConsoleLogInfo: setConsoleLogInfo,
        getConsoleLogInfo: getConsoleLogInfo,
        getConsoleLogDebug: getConsoleLogDebug,
        setConsoleLogDebug: setConsoleLogDebug,
        getAlertTip: getAlertTip,
        setAlertTip: setAlertTip,
        setAllowPrintmeFile: setAllowPrintmeFile,
        getAllowPrintmeFile: getAllowPrintmeFile,
    };
}());
/*****************************************************************
 这里主要是业务处理中用到的一些处理常量，通过私有化封装调用使用
 *****************************************************************/
sxca_ceb.constant = (function () {
    var v = {
        "hostPath": 'http://47.94.240.187:8086',
        "behindPath": '/v2/api/webPdfSeal/getSealPicInfo',
        "getMultUserSealPicInfoPath": '/v2/api/webPdfSeal/getMultUserSealPicInfo',
        "behindPath2": '/v2/api/webPdfSeal/loadLastFile',
        "behindPath3": '/v2/common/getFileImgSrc',
        "behindPath4": '/v2/api/webPdfSeal/verifySign',
        "behindPath5": '/v2/api/webPdfSeal/esealGetServerTime',
        "getHashPath": '/v2/api/webPdfSeal/getHash',
        "pagingSignPath": '/v2/api/webPdfSeal/pagingSign',
        "signCertPath": '/v2/api/webPdfSeal/signCert',
        "uploadFilePath": "/v2/api/webPdfSeal/uploadFile",
        "getKeywordPosition": '/v2/api/webPdfSeal/searchText',
        "vctkId": 'JITComVCTKEx',
        "sealsRegion": 'sxca_seal_region',
        "sealImgId": 'sxca_seal',
        "rightMenuId": 'sxca_right_menu',
        "rightMenuTips": 'sxca_right_tips',
        "rightMenuTipszz": 'sxca_right_tips_zz',
        "zzId": 'sxca_zz',
        "failImg": 'iVBORw0KGgoAAAANSUhEUgAAATMAAAEECAMAAABz+SN5AAAAzFBMVEUAAAD///kKCgr7+/URERH///n09O7///n///nf39ro6OMgIB////n///k5OTj///lnZ2X///n///kpKSj///n///lxcW6qqqa/v7swMC9RUU////kYGBdJSUdfX13///n///lBQT+hoZ3///n///n///mBgX56enf///nS0s3///lYWFbLy8b///n///n///mTk4/Y2NOIiIW2trL///n///n///n///n///mNjYrHx8H///nu7uj///n///mZmZWwsKycnJj///kAAABT/vmfAAAAQ3RSTlMAzP3M/J/OSaXS0fhrZvJY6MAS9mEa5tvY9O0j+e/qswTw3TMLcOPkuNRA69Wteyvf0+LZgU52XVPg1onPOpLe2t2ZlzbDRAAAI3xJREFUeNrsm+tS4kAQhedkSCRACETud3G5yUVRVC4K6+b932lrMpMMshmQf0vC98cqS63yVPd09+mGxIHizdt2Yz+SK0eoLxd6Ut/MLNu233tJcPQbciVEqvbGrt/oUGCRK99wLIpTvJIrkqI1hIqPXeuuuaIA8kVyRVDP5LEH7daqt9XmuNTv9we5quYysgaAHrkiFANnXms0U8D81g1jDAD35MqeYqkcC6hGrpRww6kAyJArgWKjluaeIAsAdRJzAsUmTVeFlqu6gsm133AsKhVTkZ3A8N+3GoChQ2JMYXhascQOAMp+yJkACiS2+N3+6IhiWu4DDKq5nByAJIkrtt9duGqacwjSvohMQ5vEE1t2FwoSLaHYEEDDFQwA6CSW3IDxrFRMa3YNoRhTl0olKYB4+hs6AKMZLlfta23Cx3IcAKYUdxXXQPMyM1yyxBoB+QxrYNtMtODZS1MADyR2dKYAnpTzkSD57vCWBIyK39iWAWxIfOg4TocQZwvACB8qqyLCtgVpZW/hkdv7ie0vEgs+M7onxxCMUnhmrgBs6s5B80vBVL6TgYY/cTDS7CT2eQkrmY2+gdDXqtjzREtzXUeeaB0ScQ4t/kqIZLc7Ck8NEsIrAPwWldWLtAWJNj0ITNMA6LoVMoqXwfkTbva8Y6+1fQKAJYkwIsiM56zGUisREmPNdVAs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J6QJZwxqO2HNXLAderxdDdKIcOK02cqndUyrUNVqbmLVMOf0FMSk7I9X/93NU7ikVN053SHnTooFtrF/Pxuj77fIWrGy/PawFf5yhwCdkvfJa8BEWDrAeXYFY43RO604zgf54f4mk6sH6TQmr1vTflcJKETmjdvgUecKyNKL9FWAAgj4EVDnuN2gAAAAASUVORK5CYII=',
        "zIndexNum": 500, //解决图章堆叠显示问题
        "strAlg": 'SM3',//SHA256
        "currentNum": 0,
        "cancelCode": '3758096386',
        "errorPin": '3758096470',
        "nocert": '3758096481',
        "appId": '001',
        "leftOverlapSpace": 2,
        "topOverlapSpace": 2,
        "refreDom": 'sxca_ceb_dom',
        "ukeyInitParam": "",//默认是全部参数
        "currentPDFPageCount": 0,
        "currentPDFPageWidth": 0,
        "currentPDFPageHeight": 0
        /*"ukeyInitParam":"<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
		 	              "<authinfo><liblist>"+
										"<lib type=\"CSP\" version=\"1.0\" dllname=\"\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U2h1dHRsZUNzcDExXzMwMDBHTS5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+		//ShuttleCsp11_3000GM.dll 	飞天标准key
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"SklUR01LRVlfU0pLMTQyNC5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+			//JITGMKEY_SJK1424.dll		飞天OEMkey
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U0tGQVBJMjAwNzkuZGxs\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+					//SKFAPI20079.dll			海泰
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U3hjYUNzcDExXzMwMDBHTV9zLmRsbA==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+		//SxcaCsp11_3000GM_s.dll
										"</liblist></authinfo>"	*/
    };
    var getValue = function () {
        return v;
    };
    var setSeverUrl = function (serverUrl) {
        v.hostPath = serverUrl;
    };
    var subIndexNum = function () {
        v.zIndexNum = v.zIndexNum + 1;
    };
    var setCurrentPDFPageCount = function (pageCount) {
        v.currentPDFPageCount = pageCount;
    };
    var setCurrentPDFPageWidth = function (width) {
        v.currentPDFPageWidth = width;
    };
    var setCurrentPDFPageHeight = function (height) {
        v.currentPDFPageHeight = height;
    };
    var addCurrentNum = function () {
        v.currentNum = v.currentNum + 1;
    };
    return {
        getValue: getValue,
        subIndexNum: subIndexNum,
        addCurrentNum: addCurrentNum,
        setSeverUrl: setSeverUrl,
        setCurrentPDFPageCount: setCurrentPDFPageCount,
        setCurrentPDFPageWidth: setCurrentPDFPageWidth,
        setCurrentPDFPageHeight: setCurrentPDFPageHeight
    };
}());
/*****************************************************************
 主要用于封装服务端与客户端交互信息的对象封装以及提供相应的操作方法
 *****************************************************************/
sxca_ceb.trans = (function () {

//sxca_ceb.ui._alert("当前印章的标识:"+sealObjArr[sealIndex].sealId+",当前页码:"+currentPage+",文件标识:"+fileInfo.fileFlag+"电子印章坐标:["+x+","+y+"]");
    var SealObj = function (sealId, x, y, fileFlag, currentPageNo) {
        this.sealId = sealId;//印章编号
        this.x = x;//印章x坐标
        this.y = y;//印章y坐标
        this.fileFlag = fileFlag;//文件标识
        this.currentPageNo = currentPageNo;//当前页码
    };

    SealObj.prototype = {
        constructor: SealObj,
        getSealId: function () {
            return this.sealId;
        },
        getX: function () {
            return this.x;
        },
        getY: function () {
            return this.y;
        },
        getFileFlag: function () {
            return this.fileFlag;
        },
        getCurrentPageNo: function () {
            return this.currentPageNo;
        },

        setSealId: function (sealId) {
            this.sealId = sealId;
        },
        setX: function (x) {
            this.x = x;
        },
        setY: function (y) {
            this.y = y;
        },
        setFileFlag: function (fileFlag) {
            this.fileFlag = fileFlag;
        },
        setCurrentPageNo: function (currentPageNo) {
            this.currentPageNo = currentPageNo;
        },

    };

    return {
        SealObj: SealObj
    };
}());


/*****************************************************************
 简单封装当前证书信息实体和初始化印章序列
 *****************************************************************/

sxca_ceb.current = (function () {
    var fileInfo = {
        fileFlag: '',
        pageWidth: 800,
        pageHeight: 1132,
        isSign: 0
    };
    var cert = {
        "strDN": "",
        "strDNIssuer": "",
        "pubkeyCert": ""
    };
    var sealType = '';
    var sealParam = {
        sealPage: '',
        sealX: '',
        sealY: ''
    };
    var initSeals = [];//页面加载缓存从电子印章平台获取的印章信息
    var initCerts = [];//页面加载缓存从Ukey中获取的证书信息列表
    var certSubjectStr="";//页面加载缓存读取所有证书的证书主题字符串拼接（以#号分隔）
    var certSeals;//用于缓存从印章平台获取的印章数据
    var returnCertSeals = [];//用于缓存从印章平台获取的印章数据


    /************************优化签名优化时间********************************************/
    var currentActionInitUkeyParam = 0;//0表示没有进行初始化key参数 1表示已经初始化
    var setCurrentActionInitUkeyParam = function (initFlag) {
        currentActionInitUkeyParam = initFlag;
    };
    var getCurrentActionInitUkeyParam = function () {
        return currentActionInitUkeyParam;
    };
    /************************优化签名优化时间********************************************/
    var setCertSeals = function (certSeals2) {
        certSeals = certSeals2;
    };
    var getCertSeals = function () {
        return certSeals;
    };
    var getCertSealBySignName = function (signName, currentPage) {
        var certSealObj;
        if (getCertSeals()) {
            var certSealObjList;
            var arr = getCertSeals().verifyList;
            for (var i = 0; i < arr.length; i++) {
                if (parseInt(arr[i].currentPage) == currentPage) {
                    certSealObjList = arr[i];
                    break;
                }
            }
            if (certSealObjList) {
                var marr = certSealObjList.perVerifyRes;
                for (var i = 0; i < marr.length; i++) {
                    if (marr[i].signName == signName) {
                        certSealObj = marr[i];
                        break;
                    }
                }
            }
        }
        return certSealObj;
    };
    var setFileInfo = function (fileFlag, pageWidth, pageHeight, isSign) {
        fileInfo.fileFlag = fileFlag;
        fileInfo.pageWidth = pageWidth;
        fileInfo.pageHeight = pageHeight;
        fileInfo.isSign = isSign;
    };
    var getFileInfo = function () {
        return fileInfo;
    };
    var setSealParam = function (page, x, y) {
        sealParam.sealPage = page;
        sealParam.sealX = x;
        sealParam.sealY = y;
    };
    var getSealParam = function () {
        return sealParam;
    };
    var setSealType = function (type) {
        sealType = type;
    };

    var getSealType = function () {
        return sealType;
    };
    var setCertInfo = function (strDN, strDNIssuer, pubkeyCert) {
        cert.strDN = strDN;
        cert.strDNIssuer = strDNIssuer;
        cert.pubkeyCert = pubkeyCert;
    };
    var setCertNull = function () {
        cert.strDN = "";
        cert.strDNIssuer = "";
        cert.pubkeyCert = "";
    };
    var getCertInfo = function () {
        return cert;
    };
    var pushInitSeal = function (seal) {
        initSeals.push(seal);
    };
    var setInitSealNull = function () {
        initSeals = [];
    };
    var getInitSeals = function () {
        return initSeals;
    };
   var pushReturnCertSeals = function (seal) {
        returnCertSeals.push(seal);
    };
    var setReturnCertSealsNull = function () {
        returnCertSeals = [];
    };
    var getReturnCertSeals = function () {
        return returnCertSeals;
    };
    var pushInitCerts = function (cert) {
        initCerts.push(cert);
    };
    var setInitCertsNull = function () {
        initCerts = [];
    };
    var getInitCerts = function () {
        return initCerts;
    };
    var setCertSubjectStr = function (str) {
        certSubjectStr = str;
    };
    var getCertSubjectStr = function () {
        return certSubjectStr;
    };
    var isNullOfCert = function () {
        return (cert.strDN == "") && (cert.strDNIssuer == "") && (cert.pubkeyCert == "");
    };
    return {
        setCertInfo: setCertInfo,
        getCertInfo: getCertInfo,
        isNullOfCert: isNullOfCert,
        setCertNull: setCertNull,
        setCurrentActionInitUkeyParam: setCurrentActionInitUkeyParam,
        getCurrentActionInitUkeyParam: getCurrentActionInitUkeyParam,
        pushInitSeal: pushInitSeal,
        setInitSealNull: setInitSealNull,
        getInitSeals: getInitSeals,
        setFileInfo: setFileInfo,
        getFileInfo: getFileInfo,
        setCertSeals: setCertSeals,
        getCertSeals: getCertSeals,
        getCertSealBySignName: getCertSealBySignName,
        setSealParam: setSealParam,
        getSealParam: getSealParam,
        setSealType: setSealType,
        getSealType: getSealType,
        pushInitCerts: pushInitCerts,
        setInitCertsNull: setInitCertsNull,
        getInitCerts: getInitCerts,
        setCertSubjectStr: setCertSubjectStr,
        getCertSubjectStr: getCertSubjectStr,
        pushReturnCertSeals: pushReturnCertSeals,
        setReturnCertSealsNull: setReturnCertSealsNull,
        getReturnCertSeals: getReturnCertSeals,
    };
}());

/*****************************************************************
 简单封装证书实体和其它信息,以及全局定位对象和验证印章内容的实体
 *****************************************************************/

sxca_ceb.model = (function () {
    var saveSealObj = function (page, x, y, sealId, fileId) {
        this.page = page;
        this.x = x;
        this.y = y;
        this.sealId = sealId
        this.fileId = fileId;
    };
    var CertInfoObj = function (versionNumber, serialNumber, strDN, effectiveStartTime, effectiveEndTime, strDNIssuer, email, userName, originalText) {
        this.versionNumber = versionNumber;//版本号
        this.serialNumber = serialNumber;//证书序列号
        this.strDN = strDN;//证书主题
        this.effectiveStartTime = effectiveStartTime;//有效起始时间
        this.effectiveEndTime = effectiveEndTime;//有效终止时间
        this.strDNIssuer = strDNIssuer;//颁发者主题
        this.email = email;//电子邮件
        this.userName = userName;//用户名称
        this.originalText = originalText;//原文
    };
    CertInfoObj.prototype = {
        constructor: CertInfoObj,
        getVersionNumber: function () {
            return this.versionNumber;
        },
        setVersionNumber: function (versionNumber) {
            this.versionNumber = versionNumber;
        },
        getSerialNumber: function () {
            return this.serialNumber;
        },
        setSerialNumber: function (serialNumber) {
            this.serialNumber = serialNumber;
        },
        getStrDN: function () {
            return this.strDN;
        },
        setStrDN: function (strDN) {
            this.strDN = strDN;
        },
        getEffectiveStartTime: function () {
            return this.effectiveStartTime;
        },
        setEffectiveStartTime: function (effectiveStartTime) {
            this.effectiveStartTime = effectiveStartTime;
        },
        getEffectiveEndTime: function () {
            return this.effectiveEndTime;
        },
        setEffectiveEndTime: function (effectiveEndTime) {
            this.effectiveEndTime = effectiveEndTime;
        },
        getStrDNIssuer: function () {
            return this.strDNIssuer;
        },
        setStrDNIssuer: function (strDNIssuer) {
            this.strDNIssuer = strDNIssuer;
        },
        getEmail: function () {
            return this.email;
        },
        setEmail: function (mail) {
            this.email = email;
        },
        getUserName: function () {
            return this.userName;
        },
        setUserName: function (userName) {
            this.userName = userName;
        },
        getOriginalText: function () {
            return this.originalText;
        },
        setOriginalText: function (originalText) {
            this.originalText = originalText;
        }
    };
    return {
        CertInfoObj: CertInfoObj,
        saveSealObj: saveSealObj
    };
}());
/*****************************************************************
 这里主要是sxca的加解密函数封装，用于保证传输安全
 *****************************************************************/
sxca_ceb.cipher = (function () {

    !
        function (t, n) {
            "object" == typeof exports ? module.exports = exports = n() : "function" == typeof define && define.amd ? define([], n) : t.CryptoJS = n()
        }(this,
            function () {
                var t = t ||
                    function (t, n) {
                        var i = Object.create ||
                            function () {
                                function t() {
                                }

                                return function (n) {
                                    var i;
                                    return t.prototype = n,
                                        i = new t,
                                        t.prototype = null,
                                        i
                                }
                            }(),
                            e = {},
                            r = e.lib = {},
                            o = r.Base = function () {
                                return {
                                    extend: function (t) {
                                        var n = i(this);
                                        return t && n.mixIn(t),
                                        n.hasOwnProperty("init") && this.init !== n.init || (n.init = function () {
                                            n.$super.init.apply(this, arguments)
                                        }),
                                            n.init.prototype = n,
                                            n.$super = this,
                                            n
                                    },
                                    create: function () {
                                        var t = this.extend();
                                        return t.init.apply(t, arguments),
                                            t
                                    },
                                    init: function () {
                                    },
                                    mixIn: function (t) {
                                        for (var n in t) t.hasOwnProperty(n) && (this[n] = t[n]);
                                        t.hasOwnProperty("toString") && (this.toString = t.toString)
                                    },
                                    clone: function () {
                                        return this.init.prototype.extend(this)
                                    }
                                }
                            }(),
                            s = r.WordArray = o.extend({
                                init: function (t, i) {
                                    t = this.words = t || [],
                                        i != n ? this.sigBytes = i : this.sigBytes = 4 * t.length
                                },
                                toString: function (t) {
                                    return (t || c).stringify(this)
                                },
                                concat: function (t) {
                                    var n = this.words,
                                        i = t.words,
                                        e = this.sigBytes,
                                        r = t.sigBytes;
                                    if (this.clamp(), e % 4) for (var o = 0; o < r; o++) {
                                        var s = i[o >>> 2] >>> 24 - o % 4 * 8 & 255;
                                        n[e + o >>> 2] |= s << 24 - (e + o) % 4 * 8
                                    } else for (var o = 0; o < r; o += 4) n[e + o >>> 2] = i[o >>> 2];
                                    return this.sigBytes += r,
                                        this
                                },
                                clamp: function () {
                                    var n = this.words,
                                        i = this.sigBytes;
                                    n[i >>> 2] &= 4294967295 << 32 - i % 4 * 8,
                                        n.length = t.ceil(i / 4)
                                },
                                clone: function () {
                                    var t = o.clone.call(this);
                                    return t.words = this.words.slice(0),
                                        t
                                },
                                random: function (n) {
                                    for (var i, e = [], r = function (n) {
                                            var n = n,
                                                i = 987654321,
                                                e = 4294967295;
                                            return function () {
                                                i = 36969 * (65535 & i) + (i >> 16) & e,
                                                    n = 18e3 * (65535 & n) + (n >> 16) & e;
                                                var r = (i << 16) + n & e;
                                                return r /= 4294967296,
                                                    r += .5,
                                                r * (t.random() > .5 ? 1 : -1)
                                            }
                                        },
                                             o = 0; o < n; o += 4) {
                                        var a = r(4294967296 * (i || t.random()));
                                        i = 987654071 * a(),
                                            e.push(4294967296 * a() | 0)
                                    }
                                    return new s.init(e, n)
                                }
                            }),
                            a = e.enc = {},
                            c = a.Hex = {
                                stringify: function (t) {
                                    for (var n = t.words,
                                             i = t.sigBytes,
                                             e = [], r = 0; r < i; r++) {
                                        var o = n[r >>> 2] >>> 24 - r % 4 * 8 & 255;
                                        e.push((o >>> 4).toString(16)),
                                            e.push((15 & o).toString(16))
                                    }
                                    return e.join("")
                                },
                                parse: function (t) {
                                    for (var n = t.length,
                                             i = [], e = 0; e < n; e += 2) i[e >>> 3] |= parseInt(t.substr(e, 2), 16) << 24 - e % 8 * 4;
                                    return new s.init(i, n / 2)
                                }
                            },
                            u = a.Latin1 = {
                                stringify: function (t) {
                                    for (var n = t.words,
                                             i = t.sigBytes,
                                             e = [], r = 0; r < i; r++) {
                                        var o = n[r >>> 2] >>> 24 - r % 4 * 8 & 255;
                                        e.push(String.fromCharCode(o))
                                    }
                                    return e.join("")
                                },
                                parse: function (t) {
                                    for (var n = t.length,
                                             i = [], e = 0; e < n; e++) i[e >>> 2] |= (255 & t.charCodeAt(e)) << 24 - e % 4 * 8;
                                    return new s.init(i, n)
                                }
                            },
                            f = a.Utf8 = {
                                stringify: function (t) {
                                    try {
                                        return decodeURIComponent(escape(u.stringify(t)))
                                    } catch (t) {
                                        throw new Error("Malformed UTF-8 data")
                                    }
                                },
                                parse: function (t) {
                                    return u.parse(unescape(encodeURIComponent(t)))
                                }
                            },
                            h = r.BufferedBlockAlgorithm = o.extend({
                                reset: function () {
                                    this._data = new s.init,
                                        this._nDataBytes = 0
                                },
                                _append: function (t) {
                                    "string" == typeof t && (t = f.parse(t)),
                                        this._data.concat(t),
                                        this._nDataBytes += t.sigBytes
                                },
                                _process: function (n) {
                                    var i = this._data,
                                        e = i.words,
                                        r = i.sigBytes,
                                        o = this.blockSize,
                                        a = 4 * o,
                                        c = r / a;
                                    c = n ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0);
                                    var u = c * o,
                                        f = t.min(4 * u, r);
                                    if (u) {
                                        for (var h = 0; h < u; h += o) this._doProcessBlock(e, h);
                                        var p = e.splice(0, u);
                                        i.sigBytes -= f
                                    }
                                    return new s.init(p, f)
                                },
                                clone: function () {
                                    var t = o.clone.call(this);
                                    return t._data = this._data.clone(),
                                        t
                                },
                                _minBufferSize: 0
                            }),
                            p = (r.Hasher = h.extend({
                                cfg: o.extend(),
                                init: function (t) {
                                    this.cfg = this.cfg.extend(t),
                                        this.reset()
                                },
                                reset: function () {
                                    h.reset.call(this),
                                        this._doReset()
                                },
                                update: function (t) {
                                    return this._append(t),
                                        this._process(),
                                        this
                                },
                                finalize: function (t) {
                                    t && this._append(t);
                                    var n = this._doFinalize();
                                    return n
                                },
                                blockSize: 16,
                                _createHelper: function (t) {
                                    return function (n, i) {
                                        return new t.init(i).finalize(n)
                                    }
                                },
                                _createHmacHelper: function (t) {
                                    return function (n, i) {
                                        return new p.HMAC.init(t, i).finalize(n)
                                    }
                                }
                            }), e.algo = {});
                        return e
                    }(Math);
                return t
            });

    !
        function (e, t, i) {
            "object" == typeof exports ? module.exports = exports = t(require("./core.min"), require("./sha1.min"), require("./hmac.min")) : "function" == typeof define && define.amd ? define(["./core.min", "./sha1.min", "./hmac.min"], t) : t(e.CryptoJS)
        }(this,
            function (e) {
                return function () {
                    var t = e,
                        i = t.lib,
                        r = i.Base,
                        n = i.WordArray,
                        o = t.algo,
                        a = o.MD5,
                        c = o.EvpKDF = r.extend({
                            cfg: r.extend({
                                keySize: 4,
                                hasher: a,
                                iterations: 1
                            }),
                            init: function (e) {
                                this.cfg = this.cfg.extend(e)
                            },
                            compute: function (e, t) {
                                for (var i = this.cfg,
                                         r = i.hasher.create(), o = n.create(), a = o.words, c = i.keySize, f = i.iterations; a.length < c;) {
                                    s && r.update(s);
                                    var s = r.update(e).finalize(t);
                                    r.reset();
                                    for (var u = 1; u < f; u++) s = r.finalize(s),
                                        r.reset();
                                    o.concat(s)
                                }
                                return o.sigBytes = 4 * c,
                                    o
                            }
                        });
                    t.EvpKDF = function (e, t, i) {
                        return c.create(i).compute(e, t)
                    }
                }(),
                    e.EvpKDF
            });

    !
        function (r, e) {
            "object" == typeof exports ? module.exports = exports = e(require("./core.min")) : "function" == typeof define && define.amd ? define(["./core.min"], e) : e(r.CryptoJS)
        }(this,
            function (r) {
                return function () {
                    function e(r, e, t) {
                        for (var n = [], i = 0, o = 0; o < e; o++) if (o % 4) {
                            var f = t[r.charCodeAt(o - 1)] << o % 4 * 2,
                                c = t[r.charCodeAt(o)] >>> 6 - o % 4 * 2;
                            n[i >>> 2] |= (f | c) << 24 - i % 4 * 8,
                                i++
                        }
                        return a.create(n, i)
                    }

                    var t = r,
                        n = t.lib,
                        a = n.WordArray,
                        i = t.enc;
                    i.Base64 = {
                        stringify: function (r) {
                            var e = r.words,
                                t = r.sigBytes,
                                n = this._map;
                            r.clamp();
                            for (var a = [], i = 0; i < t; i += 3) for (var o = e[i >>> 2] >>> 24 - i % 4 * 8 & 255, f = e[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255, c = e[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, s = o << 16 | f << 8 | c, h = 0; h < 4 && i + .75 * h < t; h++) a.push(n.charAt(s >>> 6 * (3 - h) & 63));
                            var p = n.charAt(64);
                            if (p) for (; a.length % 4;) a.push(p);
                            return a.join("")
                        },
                        parse: function (r) {
                            var t = r.length,
                                n = this._map,
                                a = this._reverseMap;
                            if (!a) {
                                a = this._reverseMap = [];
                                for (var i = 0; i < n.length; i++) a[n.charCodeAt(i)] = i
                            }
                            var o = n.charAt(64);
                            if (o) {
                                var f = r.indexOf(o);
                                f !== -1 && (t = f)
                            }
                            return e(r, t, a)
                        },
                        _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
                    }
                }(),
                    r.enc.Base64
            });

    !
        function (e, t, r) {
            "object" == typeof exports ? module.exports = exports = t(require("./core.min"), require("./evpkdf.min")) : "function" == typeof define && define.amd ? define(["./core.min", "./evpkdf.min"], t) : t(e.CryptoJS)
        }(this,
            function (e) {
                e.lib.Cipher ||
                function (t) {
                    var r = e,
                        i = r.lib,
                        n = i.Base,
                        c = i.WordArray,
                        o = i.BufferedBlockAlgorithm,
                        s = r.enc,
                        a = (s.Utf8, s.Base64),
                        f = r.algo,
                        p = f.EvpKDF,
                        d = i.Cipher = o.extend({
                            cfg: n.extend(),
                            createEncryptor: function (e, t) {
                                return this.create(this._ENC_XFORM_MODE, e, t)
                            },
                            createDecryptor: function (e, t) {
                                return this.create(this._DEC_XFORM_MODE, e, t)
                            },
                            init: function (e, t, r) {
                                this.cfg = this.cfg.extend(r),
                                    this._xformMode = e,
                                    this._key = t,
                                    this.reset()
                            },
                            reset: function () {
                                o.reset.call(this),
                                    this._doReset()
                            },
                            process: function (e) {
                                return this._append(e),
                                    this._process()
                            },
                            finalize: function (e) {
                                e && this._append(e);
                                var t = this._doFinalize();
                                return t
                            },
                            keySize: 4,
                            ivSize: 4,
                            _ENC_XFORM_MODE: 1,
                            _DEC_XFORM_MODE: 2,
                            _createHelper: function () {
                                function e(e) {
                                    return "string" == typeof e ? B : x
                                }

                                return function (t) {
                                    return {
                                        encrypt: function (r, i, n) {
                                            return e(i).encrypt(t, r, i, n)
                                        },
                                        decrypt: function (r, i, n) {
                                            return e(i).decrypt(t, r, i, n)
                                        }
                                    }
                                }
                            }()
                        }),
                        h = (i.StreamCipher = d.extend({
                            _doFinalize: function () {
                                var e = this._process(!0);
                                return e
                            },
                            blockSize: 1
                        }), r.mode = {}),
                        u = i.BlockCipherMode = n.extend({
                            createEncryptor: function (e, t) {
                                return this.Encryptor.create(e, t)
                            },
                            createDecryptor: function (e, t) {
                                return this.Decryptor.create(e, t)
                            },
                            init: function (e, t) {
                                this._cipher = e,
                                    this._iv = t
                            }
                        }),
                        l = h.CBC = function () {
                            function e(e, r, i) {
                                var n = this._iv;
                                if (n) {
                                    var c = n;
                                    this._iv = t
                                } else var c = this._prevBlock;
                                for (var o = 0; o < i; o++) e[r + o] ^= c[o]
                            }

                            var r = u.extend();
                            return r.Encryptor = r.extend({
                                processBlock: function (t, r) {
                                    var i = this._cipher,
                                        n = i.blockSize;
                                    e.call(this, t, r, n),
                                        i.encryptBlock(t, r),
                                        this._prevBlock = t.slice(r, r + n)
                                }
                            }),
                                r.Decryptor = r.extend({
                                    processBlock: function (t, r) {
                                        var i = this._cipher,
                                            n = i.blockSize,
                                            c = t.slice(r, r + n);
                                        i.decryptBlock(t, r),
                                            e.call(this, t, r, n),
                                            this._prevBlock = c
                                    }
                                }),
                                r
                        }(),
                        _ = r.pad = {},
                        v = _.Pkcs7 = {
                            pad: function (e, t) {
                                for (var r = 4 * t,
                                         i = r - e.sigBytes % r,
                                         n = i << 24 | i << 16 | i << 8 | i,
                                         o = [], s = 0; s < i; s += 4) o.push(n);
                                var a = c.create(o, i);
                                e.concat(a)
                            },
                            unpad: function (e) {
                                var t = 255 & e.words[e.sigBytes - 1 >>> 2];
                                e.sigBytes -= t
                            }
                        },
                        y = (i.BlockCipher = d.extend({
                            cfg: d.cfg.extend({
                                mode: l,
                                padding: v
                            }),
                            reset: function () {
                                d.reset.call(this);
                                var e = this.cfg,
                                    t = e.iv,
                                    r = e.mode;
                                if (this._xformMode == this._ENC_XFORM_MODE) var i = r.createEncryptor;
                                else {
                                    var i = r.createDecryptor;
                                    this._minBufferSize = 1
                                }
                                this._mode && this._mode.__creator == i ? this._mode.init(this, t && t.words) : (this._mode = i.call(r, this, t && t.words), this._mode.__creator = i)
                            },
                            _doProcessBlock: function (e, t) {
                                this._mode.processBlock(e, t)
                            },
                            _doFinalize: function () {
                                var e = this.cfg.padding;
                                if (this._xformMode == this._ENC_XFORM_MODE) {
                                    e.pad(this._data, this.blockSize);
                                    var t = this._process(!0)
                                } else {
                                    var t = this._process(!0);
                                    e.unpad(t)
                                }
                                return t
                            },
                            blockSize: 4
                        }), i.CipherParams = n.extend({
                            init: function (e) {
                                this.mixIn(e)
                            },
                            toString: function (e) {
                                return (e || this.formatter).stringify(this)
                            }
                        })),
                        m = r.format = {},
                        k = m.OpenSSL = {
                            stringify: function (e) {
                                var t = e.ciphertext,
                                    r = e.salt;
                                if (r) var i = c.create([1398893684, 1701076831]).concat(r).concat(t);
                                else var i = t;
                                return i.toString(a)
                            },
                            parse: function (e) {
                                var t = a.parse(e),
                                    r = t.words;
                                if (1398893684 == r[0] && 1701076831 == r[1]) {
                                    var i = c.create(r.slice(2, 4));
                                    r.splice(0, 4),
                                        t.sigBytes -= 16
                                }
                                return y.create({
                                    ciphertext: t,
                                    salt: i
                                })
                            }
                        },
                        x = i.SerializableCipher = n.extend({
                            cfg: n.extend({
                                format: k
                            }),
                            encrypt: function (e, t, r, i) {
                                i = this.cfg.extend(i);
                                var n = e.createEncryptor(r, i),
                                    c = n.finalize(t),
                                    o = n.cfg;
                                return y.create({
                                    ciphertext: c,
                                    key: r,
                                    iv: o.iv,
                                    algorithm: e,
                                    mode: o.mode,
                                    padding: o.padding,
                                    blockSize: e.blockSize,
                                    formatter: i.format
                                })
                            },
                            decrypt: function (e, t, r, i) {
                                i = this.cfg.extend(i),
                                    t = this._parse(t, i.format);
                                var n = e.createDecryptor(r, i).finalize(t.ciphertext);
                                return n
                            },
                            _parse: function (e, t) {
                                return "string" == typeof e ? t.parse(e, this) : e
                            }
                        }),
                        g = r.kdf = {},
                        S = g.OpenSSL = {
                            execute: function (e, t, r, i) {
                                i || (i = c.random(8));
                                var n = p.create({
                                        keySize: t + r
                                    }).compute(e, i),
                                    o = c.create(n.words.slice(t), 4 * r);
                                return n.sigBytes = 4 * t,
                                    y.create({
                                        key: n,
                                        iv: o,
                                        salt: i
                                    })
                            }
                        },
                        B = i.PasswordBasedCipher = x.extend({
                            cfg: x.cfg.extend({
                                kdf: S
                            }),
                            encrypt: function (e, t, r, i) {
                                i = this.cfg.extend(i);
                                var n = i.kdf.execute(r, e.keySize, e.ivSize);
                                i.iv = n.iv;
                                var c = x.encrypt.call(this, e, t, n.key, i);
                                return c.mixIn(n),
                                    c
                            },
                            decrypt: function (e, t, r, i) {
                                i = this.cfg.extend(i),
                                    t = this._parse(t, i.format);
                                var n = i.kdf.execute(r, e.keySize, e.ivSize, t.salt);
                                i.iv = n.iv;
                                var c = x.decrypt.call(this, e, t, n.key, i);
                                return c
                            }
                        })
                }()
            });

    !
        function (e, i) {
            "object" == typeof exports ? module.exports = exports = i(require("./core.min")) : "function" == typeof define && define.amd ? define(["./core.min"], i) : i(e.CryptoJS)
        }(this,
            function (e) {
                !
                    function () {
                        var i = e,
                            t = i.lib,
                            n = t.Base,
                            s = i.enc,
                            r = s.Utf8,
                            o = i.algo;
                        o.HMAC = n.extend({
                            init: function (e, i) {
                                e = this._hasher = new e.init,
                                "string" == typeof i && (i = r.parse(i));
                                var t = e.blockSize,
                                    n = 4 * t;
                                i.sigBytes > n && (i = e.finalize(i)),
                                    i.clamp();
                                for (var s = this._oKey = i.clone(), o = this._iKey = i.clone(), a = s.words, f = o.words, c = 0; c < t; c++) a[c] ^= 1549556828,
                                    f[c] ^= 909522486;
                                s.sigBytes = o.sigBytes = n,
                                    this.reset()
                            },
                            reset: function () {
                                var e = this._hasher;
                                e.reset(),
                                    e.update(this._iKey)
                            },
                            update: function (e) {
                                return this._hasher.update(e),
                                    this
                            },
                            finalize: function (e) {
                                var i = this._hasher,
                                    t = i.finalize(e);
                                i.reset();
                                var n = i.finalize(this._oKey.clone().concat(t));
                                return n
                            }
                        })
                    }()
            });

    !
        function (e, o, r) {
            "object" == typeof exports ? module.exports = exports = o(require("./core.min"), require("./cipher-core.min")) : "function" == typeof define && define.amd ? define(["./core.min", "./cipher-core.min"], o) : o(e.CryptoJS)
        }(this,
            function (e) {
                return e.mode.ECB = function () {
                    var o = e.lib.BlockCipherMode.extend();
                    return o.Encryptor = o.extend({
                        processBlock: function (e, o) {
                            this._cipher.encryptBlock(e, o)
                        }
                    }),
                        o.Decryptor = o.extend({
                            processBlock: function (e, o) {
                                this._cipher.decryptBlock(e, o)
                            }
                        }),
                        o
                }(),
                    e.mode.ECB
            });

    !
        function (e, r, i) {
            "object" == typeof exports ? module.exports = exports = r(require("./core.min"), require("./cipher-core.min")) : "function" == typeof define && define.amd ? define(["./core.min", "./cipher-core.min"], r) : r(e.CryptoJS)
        }(this,
            function (e) {
                return e.pad.Pkcs7
            });

    !
        function (e, r, i) {
            "object" == typeof exports ? module.exports = exports = r(require("./core.min"), require("./enc-base64.min"), require("./md5.min"), require("./evpkdf.min"), require("./cipher-core.min")) : "function" == typeof define && define.amd ? define(["./core.min", "./enc-base64.min", "./md5.min", "./evpkdf.min", "./cipher-core.min"], r) : r(e.CryptoJS)
        }(this,
            function (e) {
                return function () {
                    var r = e,
                        i = r.lib,
                        n = i.BlockCipher,
                        o = r.algo,
                        t = [],
                        c = [],
                        s = [],
                        f = [],
                        a = [],
                        d = [],
                        u = [],
                        v = [],
                        h = [],
                        y = [];
                    !
                        function () {
                            for (var e = [], r = 0; r < 256; r++) r < 128 ? e[r] = r << 1 : e[r] = r << 1 ^ 283;
                            for (var i = 0,
                                     n = 0,
                                     r = 0; r < 256; r++) {
                                var o = n ^ n << 1 ^ n << 2 ^ n << 3 ^ n << 4;
                                o = o >>> 8 ^ 255 & o ^ 99,
                                    t[i] = o,
                                    c[o] = i;
                                var p = e[i],
                                    l = e[p],
                                    _ = e[l],
                                    k = 257 * e[o] ^ 16843008 * o;
                                s[i] = k << 24 | k >>> 8,
                                    f[i] = k << 16 | k >>> 16,
                                    a[i] = k << 8 | k >>> 24,
                                    d[i] = k;
                                var k = 16843009 * _ ^ 65537 * l ^ 257 * p ^ 16843008 * i;
                                u[o] = k << 24 | k >>> 8,
                                    v[o] = k << 16 | k >>> 16,
                                    h[o] = k << 8 | k >>> 24,
                                    y[o] = k,
                                    i ? (i = p ^ e[e[e[_ ^ p]]], n ^= e[e[n]]) : i = n = 1
                            }
                        }();
                    var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],
                        l = o.AES = n.extend({
                            _doReset: function () {
                                if (!this._nRounds || this._keyPriorReset !== this._key) {
                                    for (var e = this._keyPriorReset = this._key,
                                             r = e.words,
                                             i = e.sigBytes / 4,
                                             n = this._nRounds = i + 6,
                                             o = 4 * (n + 1), c = this._keySchedule = [], s = 0; s < o; s++) if (s < i) c[s] = r[s];
                                    else {
                                        var f = c[s - 1];
                                        s % i ? i > 6 && s % i == 4 && (f = t[f >>> 24] << 24 | t[f >>> 16 & 255] << 16 | t[f >>> 8 & 255] << 8 | t[255 & f]) : (f = f << 8 | f >>> 24, f = t[f >>> 24] << 24 | t[f >>> 16 & 255] << 16 | t[f >>> 8 & 255] << 8 | t[255 & f], f ^= p[s / i | 0] << 24),
                                            c[s] = c[s - i] ^ f
                                    }
                                    for (var a = this._invKeySchedule = [], d = 0; d < o; d++) {
                                        var s = o - d;
                                        if (d % 4) var f = c[s];
                                        else var f = c[s - 4];
                                        d < 4 || s <= 4 ? a[d] = f : a[d] = u[t[f >>> 24]] ^ v[t[f >>> 16 & 255]] ^ h[t[f >>> 8 & 255]] ^ y[t[255 & f]]
                                    }
                                }
                            },
                            encryptBlock: function (e, r) {
                                this._doCryptBlock(e, r, this._keySchedule, s, f, a, d, t)
                            },
                            decryptBlock: function (e, r) {
                                var i = e[r + 1];
                                e[r + 1] = e[r + 3],
                                    e[r + 3] = i,
                                    this._doCryptBlock(e, r, this._invKeySchedule, u, v, h, y, c);
                                var i = e[r + 1];
                                e[r + 1] = e[r + 3],
                                    e[r + 3] = i
                            },
                            _doCryptBlock: function (e, r, i, n, o, t, c, s) {
                                for (var f = this._nRounds,
                                         a = e[r] ^ i[0], d = e[r + 1] ^ i[1], u = e[r + 2] ^ i[2], v = e[r + 3] ^ i[3], h = 4, y = 1; y < f; y++) {
                                    var p = n[a >>> 24] ^ o[d >>> 16 & 255] ^ t[u >>> 8 & 255] ^ c[255 & v] ^ i[h++],
                                        l = n[d >>> 24] ^ o[u >>> 16 & 255] ^ t[v >>> 8 & 255] ^ c[255 & a] ^ i[h++],
                                        _ = n[u >>> 24] ^ o[v >>> 16 & 255] ^ t[a >>> 8 & 255] ^ c[255 & d] ^ i[h++],
                                        k = n[v >>> 24] ^ o[a >>> 16 & 255] ^ t[d >>> 8 & 255] ^ c[255 & u] ^ i[h++];
                                    a = p,
                                        d = l,
                                        u = _,
                                        v = k
                                }
                                var p = (s[a >>> 24] << 24 | s[d >>> 16 & 255] << 16 | s[u >>> 8 & 255] << 8 | s[255 & v]) ^ i[h++],
                                    l = (s[d >>> 24] << 24 | s[u >>> 16 & 255] << 16 | s[v >>> 8 & 255] << 8 | s[255 & a]) ^ i[h++],
                                    _ = (s[u >>> 24] << 24 | s[v >>> 16 & 255] << 16 | s[a >>> 8 & 255] << 8 | s[255 & d]) ^ i[h++],
                                    k = (s[v >>> 24] << 24 | s[a >>> 16 & 255] << 16 | s[d >>> 8 & 255] << 8 | s[255 & u]) ^ i[h++];
                                e[r] = p,
                                    e[r + 1] = l,
                                    e[r + 2] = _,
                                    e[r + 3] = k
                            },
                            keySize: 8
                        });
                    r.AES = n._createHelper(l)
                }(),
                    e.AES
            });

    !
        function (e, n) {
            "object" == typeof exports ? module.exports = exports = n(require("./core.min")) : "function" == typeof define && define.amd ? define(["./core.min"], n) : n(e.CryptoJS)
        }(this,
            function (e) {
                return e.enc.Utf8
            });


    var conf = {
        "appKey": '@A#4sD$f%3g2^R&5',
        "appIv": 'SXCA@7034.300sdf',
        "appCode": CryptoJS.mode.CBC,
        "appPadding": CryptoJS.pad.Pkcs7,

        "globalKey": 'tCz9cgw37U4cLSWA',
        "globalCode": CryptoJS.mode.ECB,
        "globalPadding": CryptoJS.pad.Pkcs7
    };
    var appEnc = function (Plaintext) {
        var key = CryptoJS.enc.Utf8.parse(conf.appKey);
        var iv = CryptoJS.enc.Utf8.parse(conf.appIv);
        var encrypted = CryptoJS.AES.encrypt(Plaintext, key, {
            iv: iv,
            mode: conf.appCode,
            padding: conf.appPadding
        });
        //返回的是base64格式的密文
        return encrypted.toString();
    };
    var appDec = function (ciphertext) {
        var key = CryptoJS.enc.Utf8.parse(conf.appKey);
        var iv = CryptoJS.enc.Utf8.parse(conf.appIv);
        var decrypted = CryptoJS.AES.decrypt(ciphertext, key, {
            iv: iv,
            mode: conf.appCode,
            padding: conf.appPadding
        });
        return decrypted.toString(CryptoJS.enc.Utf8);
    };
    var globalEnc = function (Plaintext) {
        var key = CryptoJS.enc.Utf8.parse(conf.globalKey);
        var encrypted = CryptoJS.AES.encrypt(Plaintext, key, {
            mode: conf.globalCode,
            padding: conf.globalPadding
        });
        //返回的是base64格式的密文
        return encrypted.toString();
    };
    var globalDec = function (ciphertext) {
        var key = CryptoJS.enc.Utf8.parse(conf.globalKey);
        var decrypted = CryptoJS.AES.decrypt(ciphertext, key, {
            mode: conf.globalCode,
            padding: conf.globalPadding
        });
        return decrypted.toString(CryptoJS.enc.Utf8);
    };
    return {
        appEnc: appEnc,
        appDec: appDec,
        globalEnc: globalEnc,
        globalDec: globalDec
    };
}());
/*****************************************************************
 sxca封装的base64 编解码函数
 *****************************************************************/
sxca_ceb.base64 = (function () {

    // private property
    var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

    // public method for encoding
    var encode = function (input) {
        var output = "";
        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
        var i = 0;
        input = _utf8_encode(input);
        while (i < input.length) {
            chr1 = input.charCodeAt(i++);
            chr2 = input.charCodeAt(i++);
            chr3 = input.charCodeAt(i++);
            enc1 = chr1 >> 2;
            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
            enc4 = chr3 & 63;
            if (isNaN(chr2)) {
                enc3 = enc4 = 64;
            } else if (isNaN(chr3)) {
                enc4 = 64;
            }
            output = output +
                _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
                _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
        }
        return output;
    };

    // public method for decoding
    var decode = function (input) {
        var output = "";
        var chr1, chr2, chr3;
        var enc1, enc2, enc3, enc4;
        var i = 0;
        input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
        while (i < input.length) {
            enc1 = _keyStr.indexOf(input.charAt(i++));
            enc2 = _keyStr.indexOf(input.charAt(i++));
            enc3 = _keyStr.indexOf(input.charAt(i++));
            enc4 = _keyStr.indexOf(input.charAt(i++));
            chr1 = (enc1 << 2) | (enc2 >> 4);
            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
            chr3 = ((enc3 & 3) << 6) | enc4;
            output = output + String.fromCharCode(chr1);
            if (enc3 != 64) {
                output = output + String.fromCharCode(chr2);
            }
            if (enc4 != 64) {
                output = output + String.fromCharCode(chr3);
            }
        }
        output = _utf8_decode(output);
        return output;
    };
    //将Ansi编码的字符串进行Base64编码
    var encode64 = function (input) {
        var output = "";
        var chr1, chr2, chr3 = "";
        var enc1, enc2, enc3, enc4 = "";
        var i = 0;
        do {
            chr1 = input.charCodeAt(i++);
            chr2 = input.charCodeAt(i++);
            chr3 = input.charCodeAt(i++);
            enc1 = chr1 >> 2;
            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
            enc4 = chr3 & 63;
            if (isNaN(chr2)) {
                enc3 = enc4 = 64;
            } else if (isNaN(chr3)) {
                enc4 = 64;
            }
            output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2)
                + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
            chr1 = chr2 = chr3 = "";
            enc1 = enc2 = enc3 = enc4 = "";
        } while (i < input.length);
        return output;
    };
    //将Base64编码字符串转换成Ansi编码的字符串
    var decode64 = function (input) {
        var output = "";
        var chr1, chr2, chr3 = "";
        var enc1, enc2, enc3, enc4 = "";
        var i = 0;
        if (input.length % 4 != 0) {
            return "";
        }
        var base64test = /[^A-Za-z0-9\+\/\=]/g;
        if (base64test.exec(input)) {
            return "";
        }
        do {
            enc1 = _keyStr.indexOf(input.charAt(i++));
            enc2 = _keyStr.indexOf(input.charAt(i++));
            enc3 = _keyStr.indexOf(input.charAt(i++));
            enc4 = _keyStr.indexOf(input.charAt(i++));
            chr1 = (enc1 << 2) | (enc2 >> 4);
            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
            chr3 = ((enc3 & 3) << 6) | enc4;
            output = output + String.fromCharCode(chr1);
            if (enc3 != 64) {
                output += String.fromCharCode(chr2);
            }
            if (enc4 != 64) {
                output += String.fromCharCode(chr3);
            }
            chr1 = chr2 = chr3 = "";
            enc1 = enc2 = enc3 = enc4 = "";
        } while (i < input.length);
        return output;
    };
    var utf16to8 = function (str) {
        var out, i, len, c;
        out = "";
        len = str.length;
        for (i = 0; i < len; i++) {
            c = str.charCodeAt(i);
            if ((c >= 0x0001) && (c <= 0x007F)) {
                out += str.charAt(i);
            } else if (c > 0x07FF) {
                out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
            } else {
                out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
            }
        }
        return out;
    };
    var utf8to16 = function (str) {
        var out, i, len, c;
        var char2, char3;
        out = "";
        len = str.length;
        i = 0;
        while (i < len) {
            c = str.charCodeAt(i++);
            switch (c >> 4) {
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                    // 0xxxxxxx
                    out += str.charAt(i - 1);
                    break;
                case 12:
                case 13:
                    // 110x xxxx 10xx xxxx
                    char2 = str.charCodeAt(i++);
                    out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
                    break;
                case 14:
                    // 1110 xxxx 10xx xxxx 10xx xxxx
                    char2 = str.charCodeAt(i++);
                    char3 = str.charCodeAt(i++);
                    out += String.fromCharCode(((c & 0x0F) << 12) |
                        ((char2 & 0x3F) << 6) |
                        ((char3 & 0x3F) << 0));
                    break;
            }
        }
        return out;
    };

    var _utf8_encode = function (string) {
        return encode64(utf16to8(string));
    };


    var _utf8_decode = function (utftext) {
        return utf8to16(decode64(utftext));
    };
    // private method for UTF-8 encoding
    var _utf8_encode1 = function (string) {
        string = string.replace(/\r\n/g, "\n");
        var utftext = "";
        for (var n = 0; n < string.length; n++) {
            var c = string.charCodeAt(n);
            if (c < 128) {
                utftext += String.fromCharCode(c);
            } else if ((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            } else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }

        }
        return utftext;
    };

    // private method for UTF-8 decoding
    var _utf8_decode1 = function (utftext) {
        var string = "";
        var i = 0;
        var c = c1 = c2 = 0;
        while (i < utftext.length) {
            c = utftext.charCodeAt(i);
            if (c < 128) {
                string += String.fromCharCode(c);
                i++;
            } else if ((c > 191) && (c < 224)) {
                c2 = utftext.charCodeAt(i + 1);
                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                i += 2;
            } else {
                c2 = utftext.charCodeAt(i + 1);
                c3 = utftext.charCodeAt(i + 2);
                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                i += 3;
            }
        }
        return string;
    };

    return {
        encode: encode,
        decode: decode,
        _utf8_encode: _utf8_encode,
        _utf8_decode: _utf8_decode


    };
}());
/*****************************************************************
 这里主要是封装一些供第三方调用的UI组件
 *****************************************************************/
sxca_ceb.ui = (function () {

    var myAlert = function (option) {
        //"use strict"
        if (!option) return;
        if (typeof option === 'string')
            option = {content: option};

        //添加样式
        var sty = document.createElement('style');
        var styTxt = "#xiaoyi-close-a{position:absolute;top:10px;right:10px;display:block;font-weight:700;color:#DDD;text-decoration:none;}#xiaoyi-close-a:hover{color:#CC7070}.xiaoyi-dialog a{text-decoration:none;color:#FFF;padding:10px 20px;border-radius:4px;text-shadow:1px 1px 2px #333;box-shadow:2px 2px 5px #111}.xiaoyi-dialog-a-1{background:linear-gradient(#3174ba,#3174ba 45%,#3174ba 55%,#3174ba 100%);background-color:#3174ba;}.xiaoyi-dialog a:hover{background:linear-gradient(#3174ba,#3174ba 45%,#3174ba 55%,#3174ba 100%);background-color:#3174ba;}";
        sty.type = "text/css";
        if (sty.styleSheet) {
            sty.styleSheet.cssText = styTxt;
        } else {
            sty.innerHTML = styTxt;
        }
        document.getElementsByTagName('head')[0].appendChild(sty);

        //添加alert的html
        var div = document.createElement('div');
        div.style.cssText = 'padding-bottom:0px;transition:opacity 0.3s;z-index:1000;opacity:0;font-family:\'微软雅黑\';width:300px;position:fixed;*position:absolute;top:38.2%;left:50%;background-color:#fff;border-radius:5px;margin-left:-150px;margin-top:-56px;'
        div.innerHTML = '<a href="javascript:;" id="xiaoyi-close-a" title="关闭对话框">×</a><div style="padding:20px;color:#929292;text-align:left;border:1px solid #dfdfdf;"><div style="font-size:14px;font-weight:700;margin-top:-6px;" id="xiaoyi-title">' + (option.title ? option.title : "温馨提示") + '</div><p style="font-size:12px;text-align:center;margin-top:50px;border:0px solid green;height:50px;" id="xiaoyi-content">' + (option.content ? option.content : '来自' + location.hostname + '的提醒') + '</p><div style="text-align:center;font-size:12px;margin-top:30px;" class="xiaoyi-dialog" id="xiaoyi-yes"><a href="javascript:;" class="xiaoyi-dialog-a-1">确定</a></div></div>';
        document.body.appendChild(div);
        document.getElementById('xiaoyi-yes').onclick = document.getElementById('xiaoyi-close-a').onclick = hide;
        var title = document.getElementById('xiaoyi-title');
        var content = document.getElementById('xiaoyi-content');

        function hide() {
            div.style.opacity = 0;
            if (sty.styleSheet) {//IE8以下
                div.style.display = 'none';
            } else {
                setTimeout(function () {
                    div.style.display = 'none';
                }, 300);
            }
        }

        function show() {
            div.style.display = 'block';

            setTimeout(function () {
                div.style.opacity = 1;
            });
        }

        show();

        //第一次执行alert()之后，重新赋值给alert
        myAlert = function (option) {
            if (!option) return;
            if (typeof option === 'string')
                option = {content: option};
            title.innerHTML = option.title || '温馨提示';
            content.innerHTML = option.content || '来自' + location.hostname + '的提醒';
            show();
        };
    };


    var tipPopup=function(option){
        if (!option) return;
        //添加遮罩层的html
        var procbg = document.getElementById('sxca-ceb-tipPop');
        var innerDIv='<div class="sxca-ceb-popup">';
        innerDIv+='<div class="sxca-ceb-loading">';
        innerDIv+='<div class="sxca-ceb-loading-jm"></div>';
        innerDIv+='<div class="sxca-ceb-loading-jm"></div>';
        innerDIv+='<div class="sxca-ceb-loading-jm"></div>';
        innerDIv+='<div class="sxca-ceb-loading-jm"></div>';
        innerDIv+='<div class="sxca-ceb-loading-jm"></div>';
        innerDIv+='</div>';
        innerDIv+='<div class="sxca-ceb-testing_key_font" id="msgContent">';
        innerDIv+=option.content;
        innerDIv+='</div>';
        innerDIv+='</div>';
        procbg.innerHTML=innerDIv;
        return procbg;
    };
    var _alert = function (msg) {
        _popupClose();
        if (sxca_ceb.switch.getAlertTip() == 1) {
            myAlert({title: '温馨提示', content: msg});
        }
    };
    var _popupOpen= function (msg) {
        var procbg=tipPopup({open: 1,content: msg});
        procbg.style.display="block";
        return procbg;
    };
    var _popupClose = function (procbg) {
        if(procbg){
            procbg.style.display="none";
        }
    };
    var _popupUpdContent = function (msg) {
        var msgContent = sxca_ceb.base.getId("msgContent")
        if(msgContent){
            msgContent.innerHTML=msg;
        }
    };
    return {
        _alert: _alert,
        _popupOpen: _popupOpen,
        _popupClose: _popupClose,
        _popupUpdContent: _popupUpdContent,
    };
}());
/*****************************************************************
 在执行业务时需要经常用到函数方法，这里对其进行封装一下。
 *****************************************************************/

sxca_ceb.util = (function () {
    var animate = function (obj, json, interval, sp, fn) {

        clearInterval(obj.timer);

        function getStyle(obj, arr) {
            if (obj.currentStyle) {

                return obj.currentStyle[arr]; //针对ie
            } else {

                return document.defaultView.getComputedStyle(obj, null)[arr];
            }
        }

        obj.timer = setInterval(function () {
            var flag = true;
            for (var arr in json) {
                var icur = 0;
                if (arr == "opacity") {
                    icur = Math.round(parseFloat(getStyle(obj, arr)) * 100);
                } else if (arr == "scrollTop") {

                    icur = json[arr];

                } else {
                    icur = parseInt(getStyle(obj, arr));
                    if (isNaN(icur)) {
                        icur = 0;
                    }

                }
                var speed = (json[arr] - icur) * sp;
                speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
                if (icur != json[arr]) {
                    flag = false;
                }

                if (arr == "opacity") {
                    obj.style.filter = "alpha(opacity : '+(icur + speed)+' )";
                    obj.style.opacity = (icur + speed) / 100;
                } else if (arr == "scrollTop") {
                    if (isNaN(speed)) {
                        speed = 0;
                    }
                    obj.scrollTop = icur + speed;

                } else {
                    obj.style[arr] = icur + speed + "px";
                }
            }
            if (flag) {
                clearInterval(obj.timer);
                if (fn) {
                    fn();
                }
            }
        }, interval);

    }
    /*获取指定样式的属性值*/
    var getStylePropertyValue = function (dom, property) {
        if (window.getComputedStyle) { //标准浏览器
            return getComputedStyle(dom, null)[property];
        } else {
            return dom.currentStyle[property]; //IE浏览器
        }
    };
    /*
 	动画函数：
 		dom:要运动的节点对象
 		o:{属性：目标值，属性：目标值....}  (透明度使用属性：opacity:100) 透明度的值是0-100；  里面的opacity 和  filter会自动做转换。
 		time:切换的频率，表示运动的快慢
 		fn：回调函数，在运动执行完毕后执行。
 */
    var animate2 = function (dom, o, time, fn) {
        if (time == undefined) {  //默认的切换频率
            time = 10;
        }
        //dom.termId :为每一个运动的物体添加一个属于自己的线程标识
        clearInterval(dom.termId);

        dom.termId = setInterval(function () { //创建一个定时器，实现运动
            dom.isOver = true; //是否可以停止定時器
            for (var property in o) {
                if (property == "opacity") {//如果是透明度
                    var currentValue = parseInt(getStylePropertyValue(dom, property) * 100); //当前样式属性的值
                } else {//其他样式属性
                    var currentValue = parseInt(getStylePropertyValue(dom, property)); //当前样式属性的值
                }
                //速度   正速度  负速度
                var speed = (o[property] - currentValue) / 10;
                // 三元表达式  三目运算符
                speed = currentValue > o[property] ? Math.floor(speed) : Math.ceil(speed)

                currentValue += speed; //改变样式属性的值

                if (currentValue != o[property]) {
                    dom.isOver = false; //標識不停止定時器
                }

                if (property == "opacity") {
                    dom.style.opacity = currentValue / 100;
                    dom.style.filter = 'alpha(opacity= ' + currentValue + ')';
                } else {
                    dom.style[property] = currentValue + "px"; //改变物体的样式属性值
                }

            }

            if (dom.isOver) {  //停止定时器
                clearInterval(dom.termId);
                if (fn) {  //执行回调函数
                    fn();
                }
            }

        }, time)//基于切换的频率来改变运动的快慢

    };
    var removeLineFeed = function (str) {

        return str.replace(/\r\n/g, "").replace(/\n/g, "");
    };
    var arrToStr = function (arr, sepChar) {

        return arr.join(sepChar);
    };
    var strToArr = function (str, sepChar) {
        return str.split(sepChar);
    };
    var json_strToObj = function (jsonStr) {

        return JSON.parse(jsonStr);
    };
    var json_objToStr = function (jsonObj) {
        return JSON.stringify(jsonObj);
    };


    var checkRate = function (input) { //检验参数是否为数字
        var re = /^[0-9]+.?[0-9]*/;//判断字符串是否为数字//判断正整数/[1−9]+[0−9]∗]∗/
        return re.test(input);
    };
    var sleep = function (time) {
        var startTime = new Date().getTime() + parseInt(time, 10);
        while (new Date().getTime() < startTime) {
        }
    };
    var getBrowser = function () {//判断浏览器版本
        var ua = window.navigator.userAgent;
        var isIE = window.ActiveXObject != undefined && ua.indexOf("MSIE") != -1 || !!window.ActiveXObject || "ActiveXObject" in window;
        var isFirefox = ua.indexOf("Firefox") != -1;
        var isChrome = ua.indexOf("Chrome") && window.chrome;
        var isSafari = ua.indexOf("Safari") != -1 && ua.indexOf("Version") != -1;
        if (isIE) {
            return "IE";
        } else if (isFirefox) {
            return "Firefox";
        } else if (isChrome) {
            return "Chrome";
        } else if (isSafari) {
            return "Safari";
        } else {
            return "Unkown";
        }
    };
    var IEVersion = function () {//判断是否是IE浏览器，包括Edge浏览器
        var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
        var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE浏览器
        var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE || userAgent.indexOf("Edge") > -1; //判断是否IE的Edge浏览器
        var isIE11 = userAgent.indexOf("Trident") > -1 && userAgent.indexOf("rv:11.0") > -1; //判断是否IE的Edge浏览器
        if (isIE) {
            var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
            reIE.test(userAgent);
            var fIEVersion = parseFloat(RegExp["$1"]);
            var Sys = {};
            var ua = navigator.userAgent.toLowerCase();
            var s;
            (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] :
                (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
                    (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
                        (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
                            (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
                                (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
            if (Sys.ie) {
                if (Sys.ie == 11) {
                    return "IE11";
                }
            }
            if (fIEVersion == 7) {
                return "IE7";
            } else if (fIEVersion == 8) {
                return "IE8";
            } else if (fIEVersion == 9) {
                return "IE9";
            } else if (fIEVersion == 10) {
                return "IE10";
            } else if (fIEVersion == 11 || Sys.ie == 11) {
                return "IE11";
            } else {
                return "0"
            }//IE版本过低
        } else if (isEdge) {
            return "Edge";
        } else if (isIE11) {
            return "IE11";
        } else {
            return "-1";//非IE
        }
    };

    var getPoint = function (obj) {
        var t = obj.offsetTop;
        var l = obj.offsetLeft;

        if (getBrowser() == "IE") {
            var borderLeft = obj.currentStyle.borderLeftWidth;
            var borderTop = obj.currentStyle.borderTopWidth;
            if (isNaN(borderLeft)) {
                borderLeft = 0;
            }
            if (isNaN(borderTop)) {
                borderTop = 0;
            }
            t += parseInt(borderTop);
            l += parseInt(borderLeft);

        }
        while (obj = obj.offsetParent) {
            t += obj.offsetTop;
            l += obj.offsetLeft;
            if (getBrowser() == "IE") {
                var borderLeft = parseInt(obj.currentStyle.borderLeftWidth);
                var borderTop = parseInt(obj.currentStyle.borderTopWidth);
                if (isNaN(borderLeft)) {
                    borderLeft = 0;
                }
                if (isNaN(borderTop)) {
                    borderTop = 0;
                }
                t += borderTop;
                l += borderLeft;

            }

        }
        return l + ";" + t;
    };
    var getIEborder = function (obj) {
        var ie_l = 0;
        var ie_t = 0;
        if (getBrowser() == "IE") {

            var borderLeft = obj.currentStyle.borderLeftWidth;
            var borderTop = obj.currentStyle.borderTopWidth;
            if (isNaN(borderLeft)) {
                borderLeft = 0;
            }
            if (isNaN(borderTop)) {
                borderTop = 0;
            }
            ie_t += parseInt(borderTop);
            ie_l += parseInt(borderLeft);

        }
        while (obj = obj.offsetParent) {

            if (getBrowser() == "IE") {
                var borderLeft = obj.currentStyle.borderLeftWidth;
                var borderTop = obj.currentStyle.borderTopWidth;
                if (isNaN(borderLeft)) {
                    borderLeft = 0;
                }
                if (isNaN(borderTop)) {
                    borderTop = 0;
                }
                ie_t += parseInt(borderTop);
                ie_l += parseInt(borderLeft);

            }

        }
        return ie_l + ";" + ie_t;
    };
    var getCurrentTime = function () {
        var currentTime = new Date();
        var currentStr = currentTime.getFullYear() + "" +
            (currentTime.getMonth() + 1) + "" +
            currentTime.getDate() + "" +
            currentTime.getHours() + "" +
            currentTime.getMinutes() + "" +
            currentTime.getSeconds() + "";
        var mill = "" + currentTime.getMilliseconds();
        var millLen = mill.length;
        if (millLen == 2) {
            mill = "0" + mill;
        }
        if (millLen == 1) {
            mill = "00" + mill;
        }
        currentStr = currentStr + mill + getThreeLetter();
        return currentStr;
    };
    var getThreeLetter = function () {
        return String.fromCharCode((97 + Math.random() * 25), (97 + Math.random() * 25), (97 + Math.random() * 25));
    };
    var subImg = function (src64, sealImgWidth, sealImgHeight, direction, firstRate, pageCount, currentPage, fn) {
        //原始图片base64 宽 高 骑缝章方向 第一页比例 总页数 截取第几页
        var canvas = document.createElement("canvas");// 创建canvas对象
        var x1, y1, x2, y2;
        var perPx;//剩余每份所占像素
        var firstPx;//首页所占像素
        if (direction == "top" || direction == "bottom") {
            firstPx = sealImgHeight * firstRate / 100;
            perPx = (sealImgHeight - firstPx) / (pageCount - 1)
        }
        if (direction == "left" || direction == "right") {
            firstPx = sealImgWidth * firstRate / 100;
            perPx = (sealImgWidth - firstPx) / (pageCount - 1)
        }
        //x1 需要截取的图片的左上角x坐标
        //x2 需要截取的图片的右下角x坐标
        //y1 需要截取的图片的左上角y坐标
        //y2 需要截取的图片的右下角y坐标
        var pagingSignStart = parseInt(document.getElementById("pagingSignStart").value);
        var pagingSignEnd = parseInt(document.getElementById("pagingSignEnd").value);
        if (currentPage == pagingSignStart) {
            if (direction == "top") {
                x1 = 0;
                y1 = sealImgHeight - sealImgHeight * firstRate / 100;
                x2 = sealImgWidth;
                y2 = sealImgHeight;
            }
            if (direction == "bottom") {
                x1 = 0;
                y1 = 0;
                x2 = sealImgWidth;
                y2 = sealImgHeight * firstRate / 100;

            }
            if (direction == "left") {
                x1 = sealImgWidth - sealImgWidth * firstRate / 100;
                y1 = 0;
                x2 = sealImgWidth;
                y2 = sealImgHeight;
            }
            if (direction == "right") {
                x1 = 0;
                y1 = 0;
                x2 = sealImgWidth * firstRate / 100;
                y2 = sealImgHeight;
            }
        } else if (currentPage != pagingSignEnd) {//中间页面
            if (direction == "top") {
                x1 = 0;
                y1 = sealImgHeight - firstPx - (perPx * (currentPage - pagingSignStart));
                x2 = sealImgWidth;
                y2 = sealImgHeight - firstPx - (perPx * (currentPage - pagingSignStart - 1));
            }
            if (direction == "bottom") {
                x1 = 0;
                y1 = firstPx + (perPx * (currentPage - pagingSignStart - 1));
                x2 = sealImgWidth;
                y2 = firstPx + (perPx * (currentPage - pagingSignStart));
            }
            if (direction == "left") {
                y1 = 0;
                y2 = sealImgHeight;
                x1 = sealImgWidth - firstPx - (perPx * (currentPage - pagingSignStart));
                x2 = sealImgWidth - firstPx - (perPx * (currentPage - pagingSignStart - 1));
            }
            if (direction == "right") {
                y1 = 0;
                y2 = sealImgHeight;
                x1 = firstPx + (perPx * (currentPage - pagingSignStart - 1));
                x2 = firstPx + (perPx * (currentPage - pagingSignStart));

            }
        } else {//最后一页
            if (direction == "top") {
                x1 = 0;
                x2 = sealImgWidth;
                y1 = 0;
                y2 = sealImgHeight - (firstPx + perPx * (currentPage - pagingSignStart - 1));

            }
            if (direction == "bottom") {
                x1 = 0;
                x2 = sealImgWidth;
                y1 = firstPx + perPx * (currentPage - pagingSignStart - 1);
                y2 = sealImgHeight;
            }
            if (direction == "left") {
                y1 = 0;
                y2 = sealImgHeight;
                x1 = 0;
                x2 = sealImgWidth - (firstPx + perPx * (currentPage - pagingSignStart - 1));
            }
            if (direction == "right") {
                y1 = 0;
                y2 = sealImgHeight;
                x1 = firstPx + perPx * (currentPage - pagingSignStart - 1);
                x2 = sealImgWidth;

            }
        }
        var subW = x2 - x1;
        var subH = y2 - y1;
        var ctx = canvas.getContext('2d');
        var clone = [{x: x1, y: y1}, {xx: x2, yy: y2}];
        var image = new Image();
        image.src = "data:image/png;base64," + src64;
        image.onload = function () {
            // 获取原图宽高
            //设置canvas大小与原图宽高一致
            canvas.height = sealImgHeight;
            canvas.width = sealImgWidth;
            // 在canvas绘制图片
            ctx.drawImage(this, 0, 0, sealImgWidth, sealImgHeight);
            // 获取截图区域内容,截图区域的像素点矩阵
            var cutImage = ctx.getImageData(clone[0].x, clone[0].y, clone[1].xx, clone[1].yy);
            // 裁剪后的base64数据
            var nCanvas = document.createElement('canvas');
            var nCtx = nCanvas.getContext('2d');
            nCanvas.width = subW;
            nCanvas.height = subH;
            nCtx.putImageData(cutImage, 0, 0);// 将画布上指定矩形的像素数据，通过 putImageData() 方法将图像数据放回画布
            var ret = {};
            ret.subBase64 = nCanvas.toDataURL('image/png');
            ret.subH = subH;
            ret.subW = subW;
            ret.j = currentPage;
            fn(ret);
        }
    };
    var removeAllSeal = function () {
        var eles = document.getElementsByClassName("sxca_sealImg");
        for (var j = eles.length - 1; j >= 0; j--) {
            eles[j].parentNode.removeChild(eles[j]);
        }
    };

    return {
        sleep: sleep,
        removeAllSeal: removeAllSeal,
        getBrowser: getBrowser,
        IEVersion: IEVersion,
        getCurrentTime: getCurrentTime,
        checkRate: checkRate,
        json_strToObj: json_strToObj,
        json_objToStr: json_objToStr,
        arrToStr: arrToStr,
        strToArr: strToArr,
        getThreeLetter: getThreeLetter,
        removeLineFeed: removeLineFeed,
        getPoint: getPoint,
        animate: animate,
        subImg: subImg

    };
}());
/*****************************************************************
 由于jquery等主流js框架存在安全漏洞问题，而支持非IE浏览器的vctk控件
 所依赖的jithttpclient.js的ajax方法属于同步请求，无法调整为异步请求
 且即使调整为异步请求，非IE浏览器签名验签功能将不可用，为避免冲突，
 这里自定义一个异步请求方法，用于获取印章图片等其它http请求需要
 *****************************************************************/
sxca_ceb.http = (function () {
    var defaultvar = sxca_ceb.cipher.globalEnc(sxca_ceb.constant.getValue().appId);//在默认配置中设置其为默认值
    var serialNumVar = sxca_ceb.util.getCurrentTime() + "" + sxca_ceb.util.getThreeLetter();
    var somevar = {
        "originalData": {
            "serialNum": serialNumVar,
            "appId": sxca_ceb.constant.getValue().appId,
            "timestamp": Date.now(),
        },
        "signData": ''//之所以默认值设置为空，是因为通过服务端验签时没有证书环境无法产生签名值
    };
    var somevarInit = function (callback) {
        var srcData = sxca_ceb.util.json_objToStr(somevar.originalData);
        jit_ceb.business.attachSign(srcData, function (msgObj) {
            if (msgObj && msgObj.flag == 0) {
                somevar.signData = msgObj.data;
            }
            callback(msgObj);
            return;
        });
    };

    var getDefaultvar = function () {
        return defaultvar;
    };
    var getSomevar = function () {
        return sxca_ceb.cipher.appEnc(sxca_ceb.util.json_objToStr(somevar));

    };
    var config = {
        "type": 'POST',//请求方式
        "contentType": 'application/json;charset=utf-8',//请求格式(设置在请求头)
        "defaultvar": '',//全局密钥加密的appId(设置在请求头)
        "somevar": '',//应用密钥及偏移量加密的数据(包括appId、时间戳、流水号、签名值)
        "asynchronous": true,//是否异步
        "url": '',
        "data": '',
        "success": function () {

        },
        "error": function () {

        }
    };
    var init = function (conf) {
        config.type = conf.type;
        config.contentType = conf.contentType;
        config.asynchronous = conf.asynchronous;
        config.url = conf.url;
        config.data = conf.data;
        config.defaultvar = conf.defaultvar;
        config.somevar = conf.somevar;

    };
    var getConfig = function () {
        return config;
    };
    var createXHR = function () {
        if (typeof XMLHttpRequest != "undefined") {
            return new XMLHttpRequest(); //IE7+和其他浏览器支持的
        } else if (typeof ActiveXObject != "undefined") { //IE7-支持的
            if (typeof arguments.callee.activeXString != "string") {
                var versions = ["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp"], i, len;
                for (i = 0, len = versions.length; i < len; i++) {
                    try {
                        new ActiveXObject(versions[i]);
                        arguments.callee.activeXString = versions[i];
                        break;
                    } catch (e) {
                    }
                }
            }
            return new ActiveXObject(arguments.callee.activeXString); //返回ActiveXObject对象
        } else { //全部不支持，抛出错误
            throw new Error("don't support XMLHttpRequest");
        }
    };
    var synAjax = function (config) {//同步请求函数，执行return语句才有意义。
        init(config);
        config.asynchronous = false;//强制设置为同步
        var xmlHttp = null;
        var errormsg = "{\"error\":\"获取信息失败\",\"code\":\"-1\"}";
        //1.创建Ajax对象
        xmlHttp = createXHR();
        //2.连接服务器 open方法只是启动一个请求以备发送，还未发送
        xmlHttp.open(config.type, config.url, config.asynchronous);//true: 异步
        if (config.contentType) {
            xmlHttp.setRequestHeader('content-type', config.contentType);
        }
        if (config.defaultvar != '') {
            xmlHttp.setRequestHeader('defaultvar', config.defaultvar);
        }
        if (config.somevar != '') {
            xmlHttp.setRequestHeader('somevar', config.somevar);
        }
        //3.发送请求
        try {

            sxca_ceb.journal.logDebug("同步发送消息:" + config.data);
            xmlHttp.send(config.data);

        } catch (e) {
            sxca_ceb.journal.logDebug("错误信息" + errormsg + "**** " + e + ", status = " + xmlHttp.status + ", responseText: " + xmlHttp.responseText);
            xmlHttp.abort();	//挂起请求
            return errormsg;
        }
        ;

        //4.接收返回值 和服务器通讯的时候此事件发生
        sxca_ceb.journal.logDebug("同步响应信息:" + sxca_ceb.util.removeLineFeed(xmlHttp.responseText));
        if (xmlHttp.readyState == 4 && (xmlHttp.status == 200 || xmlHttp.status == 0)) {
            if (xmlHttp.responseText == null) {
                return errormsg;
            }
            return sxca_ceb.util.removeLineFeed(xmlHttp.responseText);
        } else {
            sxca_ceb.journal.logDebug("同步return: " + xmlHttp.status + "===" + senddata + "===" + sxca_ceb.util.removeLineFeed(xmlHttp.responseText) + "===" + xmlHttp.readyState);
            return errormsg;
        }

    };
    var asynAjax = function (config) {//异步请求函数(异步请求函数的封装需要考虑异步嵌套递归调用，提高性能)
        init(config);
        var xmlHttp = null;
        var errormsg = "{\"error\":999,\"value\":\"与服务断开连接\"}";
        //1.创建Ajax对象
        xmlHttp = createXHR();
        //2.连接服务器 open方法只是启动一个请求以备发送，还未发送
        xmlHttp.open(config.type, config.url, config.asynchronous);//true: 异步
        xmlHttp.setRequestHeader('content-type', config.contentType);
        if (config.defaultvar != '') {
            xmlHttp.setRequestHeader('defaultvar', config.defaultvar);
        }
        if (config.somevar != '') {
            xmlHttp.setRequestHeader('somevar', config.somevar);
        }
        //3.发送请求
        try {

            sxca_ceb.journal.logDebug("发送消息:" + config.data);
            xmlHttp.onreadystatechange = function () {
                //XMLHTTP默认不是同步请求的
                if (xmlHttp.readyState == 4) {
                    if (xmlHttp.status == 200) { //如果状态码为200则是成功
                        sxca_ceb.journal.logDebug("返回消息 " + sxca_ceb.util.removeLineFeed(xmlHttp.responseText));
                        config.success && config.success(sxca_ceb.util.removeLineFeed(xmlHttp.responseText));

                    } else {
                        sxca_ceb.journal.logDebug("return: " + xmlHttp.status + "===" + config.data + "===" + sxca_ceb.util.removeLineFeed(xmlHttp.responseText) + "===" + xmlHttp.readyState);
                        config.error && config.error(xmlHttp.status);

                    }
                }
            };
            xmlHttp.send(config.data);//这时才开始发送请求

        } catch (e) {
            sxca_ceb.journal.logDebug("错误信息" + errormsg + "**** " + e + ", status = " + xmlHttp.status + ", responseText: " + sxca_ceb.util.removeLineFeed(xmlHttp.responseText));
            xmlHttp.abort();	//挂起请求

        }
        ;


    };
    var manyAsynAjax = function (url, jsonData, num, fn, orgstr, fn2) {//需要做实际测试

        asynAjax({
            type: "POST",//请求方式
            contentType: 'application/json;charset=utf-8',
            defaultvar: '',
            somevar: '',
            asynchronous: true,
            url: url,
            data: jsonData,
            success: function (responseText) {
                sxca_ceb.journal.logInfo("多异步请求", "递归嵌套", responseText);
                fn && fn(responseText, num, url, orgstr, fn2);
            },
            error: function (status) {
                sxca_ceb.journal.logInfo("多异步请求", "递归嵌套", "错误状态:" + status);
                fn && fn(status, num, url, orgstr, fn2);
            }
        });

    };
    return {
        synAjax: synAjax,
        asynAjax: asynAjax,
        manyAsynAjax: manyAsynAjax,
        getDefaultvar: getDefaultvar,
        getSomevar: getSomevar,
        somevarInit: somevarInit
    };
}());
/*****************************************************************
 通过请求印章服务获取印章   调用方法:sxca_ceb.chapter.getSealAddress()
 *****************************************************************/

sxca_ceb.chapter = (function () {
    var getuploadFileAddress = function () {
        var uploadFileAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().uploadFilePath;
        sxca_ceb.journal.logInfo("印章业务", "获取上传文件服务器地址", uploadFileAddress);
        return uploadFileAddress;
    };
    var getSealAddress = function () {
        var sealAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().behindPath;
        sxca_ceb.journal.logInfo("印章业务", "获取印章服务器地址", sealAddress);
        return sealAddress;
    };
    var getMultUserSealAddress = function () {
        var sealAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().getMultUserSealPicInfoPath;
        sxca_ceb.journal.logInfo("印章业务", "获取多用户印章服务器地址", sealAddress);
        return sealAddress;
    };
    var getLoadFileAddress = function () {
        var loadFileAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().behindPath2;
        sxca_ceb.journal.logInfo("印章业务", "获取加载文件地址", loadFileAddress);
        return loadFileAddress;
    };
    var getLoadFileImgAddress = function () {
        var loadFileImgAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().behindPath3;
        sxca_ceb.journal.logInfo("印章业务", "获取加载图片文件地址", loadFileImgAddress);
        return loadFileImgAddress;
    };
    var getHashAddress = function () {
        var getHashAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().getHashPath;
        sxca_ceb.journal.logInfo("印章业务", "获取文件hash值地址", getHashAddress);
        return getHashAddress;
    }
    var getEsealTimeAddress = function () {
        var esealTimeAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().behindPath5;
        sxca_ceb.journal.logInfo("印章业务", "获取印章服务器时间地址", esealTimeAddress);
        return esealTimeAddress;
    };
    var getPagingSignAddress = function () {
        var pagingSignAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().pagingSignPath;
        sxca_ceb.journal.logInfo("印章业务", "获取签署骑缝章地址", pagingSignAddress);
        return pagingSignAddress;
    }
    var signCertAddress = function () {
        var signCertAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().signCertPath;
        sxca_ceb.journal.logInfo("印章业务", "获取签名合成地址", signCertAddress);
        return signCertAddress;
    }
    var getVerifAddress = function () {
        var verifAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().behindPath4;
        sxca_ceb.journal.logInfo("印章业务", "获取签名验证地址", verifAddress);
        return verifAddress;
    };
    var getKeyWordPositionAddress = function () {
        var keyWordPositionAddress = sxca_ceb.constant.getValue().hostPath + sxca_ceb.constant.getValue().getKeywordPosition;
        sxca_ceb.journal.logInfo("印章业务", "获取关键字位置地址", keyWordPositionAddress);
        return keyWordPositionAddress;
    }
    var getCurrentPDFPageCount = function () {
        return sxca_ceb.constant.getValue().currentPDFPageCount;
    };
    var getCurrentPDFPageWidth = function () {
        return sxca_ceb.constant.getValue().currentPDFPageWidth;
    };
    var getCurrentPDFPageHeight = function () {
        return sxca_ceb.constant.getValue().currentPDFPageHeight;
    };

    var searchKeyWordPosition = function (fileFlag, keyword, pageRangeStart, pageRangeEnd, leftOrRight) {
        var requestBody = {};
        requestBody.fileFlag = fileFlag;
        requestBody.word = keyword;
        requestBody.startPage = pageRangeStart;
        requestBody.endPage = pageRangeEnd;
        requestBody.startOrEnd = leftOrRight;
        var address = getKeyWordPositionAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    var message = sxca_ceb.http.synAjax({
                        type: "POST",//请求方式
                        contentType: 'application/json;charset=utf-8',//请求格式
                        defaultvar: sxca_ceb.http.getDefaultvar(),
                        somevar: somevar,
                        asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
                        url: address,
                        data: sxca_ceb.cipher.appEnc(sxca_ceb.util.json_objToStr(requestBody))
                    });
                    var info = sxca_ceb.cipher.appDec(message);
                    var infoObj = sxca_ceb.util.json_strToObj(info);
                    if (infoObj.code == 200) {
                        sxca_ceb.journal.logInfo("获取关键字位置", "与印章平台交互获取关键字位置成功", infoObj.data);
                        return new sxca_ceb.business.busMsgObj("0", "与印章平台交互获取关键字位置成功", infoObj.data);
                    } else {
                        sxca_ceb.current.setCertNull();
                        sxca_ceb.journal.logInfo("获取关键字位置", "与印章平台交互获取关键字位置失败", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
                    }
                } else {
                    sxca_ceb.journal.logInfo("获取关键字位置", "与印章平台交互获取关键字位置失败", msgObj.msg);
                    return new sxca_ceb.business.busMsgObj("1", msgObj.msg, "");
                }
            } else {
                sxca_ceb.journal.logInfo("获取关键字位置", "与印章平台交互获取关键字位置失败", "请求头处理失败");
                return new sxca_ceb.business.busMsgObj("1", "与印章平台交互获取关键字位置失败", "");
            }
        });

    };

    var loadVerifyInfo = function (fileFlag) {
        var verifyAddress = getVerifAddress();
        var str = '{"fileFlag":"' + fileFlag + '"}';
        var somevar = sxca_ceb.http.getSomevar();
        var message = sxca_ceb.http.synAjax({
            type: "POST",//请求方式
            contentType: 'application/json;charset=utf-8',//请求格式
            defaultvar: sxca_ceb.http.getDefaultvar(),
            somevar: somevar,
            asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
            url: verifyAddress,
            data: sxca_ceb.cipher.appEnc(str)
        });
        var info = sxca_ceb.cipher.appDec(message);
        var infoObj = sxca_ceb.util.json_strToObj(info);
        if (infoObj.code == 200) {
            sxca_ceb.journal.logInfo("同步获取印章验签信息", "加载验签信息成功", infoObj.msg);
            return new sxca_ceb.business.busMsgObj("0", "同步获取印章验签信息成功", infoObj);
        } else {
            sxca_ceb.journal.logInfo("同步获取印章验签信息", "加载验签信息失败", infoObj.msg);
            return new sxca_ceb.business.busMsgObj("1", "同步获取印章验签信息失败", "");
        }
    };
     var loadVerifyInfoAsyn= function (fileFlag,fn) {
        var verifyAddress = getVerifAddress();
        var str = '{"fileFlag":"' + fileFlag + '"}';
         var somevar = sxca_ceb.http.getSomevar();
         sxca_ceb.http.asynAjax({
             type: "POST",
             contentType: 'application/json;charset=utf-8',
             defaultvar: sxca_ceb.http.getDefaultvar(),
             somevar: somevar,
             asynchronous: true,
             url: verifyAddress,
             data: sxca_ceb.cipher.appEnc(str),
             success: function(message){

                 var info = sxca_ceb.cipher.appDec(message);
                 var infoObj = sxca_ceb.util.json_strToObj(info);
                 if (infoObj.code == 200) {
                     sxca_ceb.journal.logInfo("异步获取印章验签信息", "加载验签信息成功", infoObj.msg);

                     fn&&fn (new sxca_ceb.business.busMsgObj("0", "异步获取印章验签信息成功", infoObj));
                 } else {
                     sxca_ceb.journal.logInfo("异步获取印章验签信息", "加载验签信息失败", infoObj.msg);

                     fn&&fn (new sxca_ceb.business.busMsgObj("1", "同步获取印章验签信息失败", ""));
                 }

             },
             error: function(status){

                 fn&&fn(new sxca_ceb.business.busMsgObj("1", infoObj.msg, "网络状态:"+status));
             }
         });

    };
    var getSealSeverTime = function () {//不带签名值的获取服务器时间(减少时间延迟，建议使用)
        var timeAddress = getEsealTimeAddress();
        var somevar = sxca_ceb.http.getSomevar();
        var message = sxca_ceb.http.synAjax({
            type: "POST",//请求方式
            contentType: 'application/json;charset=utf-8',//请求格式
            defaultvar: sxca_ceb.http.getDefaultvar(),
            somevar: somevar,
            asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
            url: timeAddress,
            data: ''

        });
        var info = sxca_ceb.cipher.appDec(message);
        var infoObj = sxca_ceb.util.json_strToObj(info);
        if (infoObj.code == 200) {
            sxca_ceb.journal.logInfo("同步获取印章服务器时间信息", "与印章平台交互成功", infoObj.msg);
            return infoObj.data;
        } else {
            sxca_ceb.journal.logInfo("同步获取印章服务器时间信息", "与印章平台交互失败", infoObj.msg);
            return "";
        }
    };
    var getSealSeverTime2 = function () {//带签名值的获取服务器时间(会增加时间延迟，不建议使用)
        var timeAddress = getEsealTimeAddress();
        var msgObj = sxca_ceb.http.somevarInit();
        if (msgObj) {
            var somevar = sxca_ceb.http.getSomevar();
            var message = sxca_ceb.http.synAjax({
                type: "POST",//请求方式
                contentType: 'application/json;charset=utf-8',//请求格式
                defaultvar: sxca_ceb.http.getDefaultvar(),
                somevar: somevar,
                asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
                url: timeAddress,
                data: ''

            });
            var info = sxca_ceb.cipher.appDec(message);
            var infoObj = sxca_ceb.util.json_strToObj(info);

            if (infoObj.code == 200) {
                sxca_ceb.journal.logInfo("同步获取印章服务器时间信息", "与印章平台交互成功", infoObj.msg);
                return infoObj.data;
            } else {
                sxca_ceb.journal.logInfo("同步获取印章服务器时间信息", "与印章平台交互失败", infoObj.msg);
                return "";
            }
        } else {
            sxca_ceb.journal.logInfo("同步获取印章服务器时间信息", "与印章平台交互失败", "请求头处理失败");
            return "";
        }
    };
    var getSealArrayBySyn = function (infoStr) {
        if (infoStr == "" && sxca_ceb.switch.getSealsGetType() != 0) {
            sxca_ceb.journal.logInfo("同步获取印章信息", "获取印章信息失败", "请输入获取印章参数");
            return new sxca_ceb.business.busMsgObj("1", "请输入获取印章参数", "");
        }
        var address = getSealAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var str = '{"sealsGetType":"' + sxca_ceb.switch.getSealsGetType() + '","infoStr":"' + infoStr + '"}';
                    var somevar = sxca_ceb.http.getSomevar();
                    var message = sxca_ceb.http.synAjax({
                        type: "POST",//请求方式
                        contentType: 'application/json;charset=utf-8',//请求格式
                        defaultvar: sxca_ceb.http.getDefaultvar(),
                        somevar: somevar,
                        asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
                        url: address,
                        data: sxca_ceb.cipher.appEnc(str)

                    });
                    var info = sxca_ceb.cipher.appDec(message);
                    var infoObj = sxca_ceb.util.json_strToObj(info);

                    if (infoObj.code == 200) {
                        sxca_ceb.journal.logInfo("同步获取印章信息", "与印章平台交互查询印章成功", infoObj.data);
                        return new sxca_ceb.business.busMsgObj("0", "查询印章成功", infoObj.data);
                    } else {
                        sxca_ceb.current.setCertNull();
                        sxca_ceb.journal.logInfo("同步获取印章信息", "与印章平台交互查询印章失败", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
                    }
                } else {
                    sxca_ceb.journal.logInfo("同步获取印章信息", "同步获取印章数据失败", msgObj.msg);
                    return new sxca_ceb.business.busMsgObj("1", msgObj.msg, "");
                }
            } else {
                sxca_ceb.journal.logInfo("同步获取印章信息", "同步获取印章数据失败", "请求头处理失败");
                return new sxca_ceb.business.busMsgObj("1", "同步获取印章数据失败", "");
            }
        });

    };
    //使用时根据同步获取印章信息进行酌情修改 ,暂时未使用
    var getSealArrayByAsyn = function () {
        var arr = [];
        var address = getSealAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    sxca_ceb.http.asynAjax({
                        type: "POST",//请求方式
                        contentType: 'application/json;charset=utf-8',//请求格式
                        defaultvar: sxca_ceb.http.getDefaultvar(),
                        somevar: somevar,
                        asynchronous: true,//是否异步 (同步请求将锁住浏览器)
                        url: address,
                        data: '',
                        success: function (responseText) {
                            sxca_ceb.journal.logInfo("异步获取印章信息", "与印章平台交互", responseText);
                            var info = sxca_ceb.cipher.appDec(responseText);
                            var infoObj = sxca_ceb.util.json_strToObj(info);
                            arr = infoObj.data;
                        },
                        error: function (status) {
                            sxca_ceb.journal.logInfo("异步获取印章信息", "与印章平台交互异步获取印章失败", "错误状态:" + status);
                            return new sxca_ceb.business.busMsgObj("1", "请求失败", arr);
                        }
                    });
                } else {
                    sxca_ceb.journal.logInfo("异步获取印章信息", "异步获取印章数据失败", msgObj.msg);
                    return new sxca_ceb.business.busMsgObj("1", msgObj.msg, "");
                }
            } else {
                sxca_ceb.journal.logInfo("异步获取印章信息", "异步获取印章数据失败", "请求头处理失败");
                return new sxca_ceb.business.busMsgObj("1", "异步获取印章数据失败", "");
            }
        });
    };
    var getMultUserSealArrayByAsyn = function (infoStr,fn) {
        if (infoStr == "" && sxca_ceb.switch.getSealsGetType() != 0) {
            sxca_ceb.journal.logInfo("同步获取印章信息", "获取印章信息失败", "请输入获取印章参数");
            fn&&fn ( new sxca_ceb.business.busMsgObj("1", "请输入获取印章参数", ""));
            return;
        }
        if(sxca_ceb.switch.getSealsGetType() == 0){
            // var certSubjectStr = "CN=山西省平遥煤化（集团）有限责任公司,OU=S354009,OU=911407287435183299,O=tictc,C=CN#CN=阴霄飞,OU=山西省平遥煤化（集团）有限责任公司,O=tictc,C=CN";
            // var certSubjectStr = "CN=山西临汾西山能源有限责任公司销售分公司,OU=60800167,OU=91141000MA0K7FJR6G,O=焦煤在线,C=CN ";
            var certSubjectStr = sxca_ceb.current.getCertSubjectStr();
            if(!certSubjectStr || certSubjectStr == null || certSubjectStr == ""){
                fn&&fn (new sxca_ceb.business.busMsgObj("1", "请输入获取印章参数", ""));
                return;
            }
            infoStr = certSubjectStr;
        }
        var address = getMultUserSealAddress();
        var somevar = sxca_ceb.http.getSomevar();
        var str = '{"sealsGetType":"' + sxca_ceb.switch.getSealsGetType() + '","infoStr":"' + infoStr + '"}';
        sxca_ceb.http.asynAjax({
            type: "POST",
            contentType: 'application/json;charset=utf-8',
            defaultvar: sxca_ceb.http.getDefaultvar(),
            somevar: somevar,
            asynchronous: true,
            url: address,
            data: sxca_ceb.cipher.appEnc(str),
            success: function(message){
                var info = sxca_ceb.cipher.appDec(message);
                var infoObj = sxca_ceb.util.json_strToObj(info);
                if (infoObj.code == 200) {
                    sxca_ceb.journal.logInfo("异步获取多用户印章信息", "与印章平台交互查询印章成功", infoObj.data);
                    fn&&fn (new sxca_ceb.business.busMsgObj("0", "查询印章成功", infoObj.data));
                    return;
                } else {
                    sxca_ceb.journal.logInfo("异步获取多用户印章信息", "与印章平台交互查询印章失败", infoObj.msg);
                    fn&&fn ( new sxca_ceb.business.busMsgObj("1", infoObj.msg, ""));
                    return;
                }
            },
            error: function(status){
                fn&&fn(new sxca_ceb.business.busMsgObj("1", "与印章平台交互查询印章失败", "网络状态:"+status));
                return;
            }
        });
    };
    var getMultUserSealArrayBySyn = function (infoStr) {
        if (infoStr == "" && sxca_ceb.switch.getSealsGetType() != 0) {
            sxca_ceb.journal.logInfo("同步获取印章信息", "获取印章信息失败", "请输入获取印章参数");
            return new sxca_ceb.business.busMsgObj("1", "请输入获取印章参数", "");
        }
        if(sxca_ceb.switch.getSealsGetType() == 0){
            var certSubjectStr = sxca_ceb.current.getCertSubjectStr();
            if(!certSubjectStr || certSubjectStr == null || certSubjectStr == ""){
                return new sxca_ceb.business.busMsgObj("1", "请输入获取印章参数", "");
            }
            infoStr = certSubjectStr;
        }
        var address = getMultUserSealAddress();
        var str = '{"sealsGetType":"' + sxca_ceb.switch.getSealsGetType() + '","infoStr":"' + infoStr + '"}';
        var somevar = sxca_ceb.http.getSomevar();
        var message = sxca_ceb.http.synAjax({
            type: "POST",//请求方式
            contentType: 'application/json;charset=utf-8',//请求格式
            defaultvar: sxca_ceb.http.getDefaultvar(),
            somevar: somevar,
            asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
            url: address,
            data: sxca_ceb.cipher.appEnc(str)
        });
        var info = sxca_ceb.cipher.appDec(message);
        var infoObj = sxca_ceb.util.json_strToObj(info);
        if (infoObj.code == 200) {
            sxca_ceb.journal.logInfo("同步获取印章信息", "与印章平台交互查询印章成功", infoObj.data);
            return new sxca_ceb.business.busMsgObj("0", "查询印章成功", infoObj.data);
        } else {
            sxca_ceb.current.setCertNull();
            sxca_ceb.journal.logInfo("同步获取印章信息", "与印章平台交互查询印章失败", infoObj.msg);
            return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
        }
    };
    var getFileParamInfo = function (businessId) {
        var str = '{"businessId":"' + businessId + '"}';
        var address = getLoadFileAddress();
        var somevar = sxca_ceb.http.getSomevar();
        var message = sxca_ceb.http.synAjax({
            type: "POST",//请求方式
            contentType: 'application/json;charset=utf-8',//请求格式
            defaultvar: sxca_ceb.http.getDefaultvar(),
            somevar: somevar,
            asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
            url: address,
            data: sxca_ceb.cipher.appEnc(str)
        });
        var info = sxca_ceb.cipher.appDec(message);
        var infoObj = sxca_ceb.util.json_strToObj(info);
        if (infoObj.code == 200) {
            sxca_ceb.journal.logInfo("同步获取加载文件响应信息", "与印章平台交互获取文件信息成功", infoObj.msg);
            return new sxca_ceb.business.busMsgObj("0", "获取文件信息成功", infoObj.data);
        } else {
            sxca_ceb.journal.logInfo("同步获取加载文件响应信息", "与印章平台交互获取文件信息失败", infoObj.msg);
            return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
        }
    };
    var getFileParamInfoAsyn = function (businessId,fn) {
        var str = '{"businessId":"' + businessId + '"}';
        var address = getLoadFileAddress();
        var somevar = sxca_ceb.http.getSomevar();
        sxca_ceb.http.asynAjax({
            type: "POST",
            contentType: 'application/json;charset=utf-8',
            defaultvar: sxca_ceb.http.getDefaultvar(),
            somevar: somevar,
            asynchronous: true,
            url: address,
            data: sxca_ceb.cipher.appEnc(str),
            success: function(message){
                var info = sxca_ceb.cipher.appDec(message);
                var infoObj = sxca_ceb.util.json_strToObj(info);
                if (infoObj.code == 200) {
                    sxca_ceb.journal.logInfo("异步获取加载文件响应信息", "与印章平台交互获取文件信息成功", infoObj.msg);
                    fn&&fn (new sxca_ceb.business.busMsgObj("0", "获取文件信息成功", infoObj.data));
                } else {
                    sxca_ceb.journal.logInfo("异步获取加载文件响应信息", "与印章平台交互获取文件信息失败", infoObj.msg);
                    fn&&fn ( new sxca_ceb.business.busMsgObj("1", infoObj.msg, ""));
                }
            },
            error: function(status){
                sxca_ceb.journal.logInfo("异步获取加载文件响应信息", "与印章平台交互获取文件信息失败", "网络状态:"+status);
                fn&&fn(new sxca_ceb.business.busMsgObj("1", "与印章平台交互获取文件信息失败", "网络状态:"+status));
            }
        });
    };
    var getFileHashAsyn=function(str,fn){
        var address = getHashAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    sxca_ceb.http.asynAjax({
                        type:"POST",//请求方式
                        contentType:'application/json;charset=utf-8',//请求格式
                        defaultvar:sxca_ceb.http.getDefaultvar(),
                        somevar:somevar,
                        asynchronous:true,//是否异步 (同步请求将锁住浏览器)
                        url: address,
                        data:sxca_ceb.cipher.appEnc(str),
                        success: function(message){
                            var info = sxca_ceb.cipher.appDec(message);
                            var infoObj = sxca_ceb.util.json_strToObj(info);
                            if (infoObj.code == 200) {
                                sxca_ceb.journal.logInfo("异步获取文件HASH值成功", "与印章平台交互获取文件HASH值成功", infoObj.msg);
                                fn&&fn (new sxca_ceb.business.busMsgObj("0", "获取文件hash值成功", infoObj.data));
                            } else {
                                sxca_ceb.journal.logInfo("异步获取文件HASH值失败", "与印章平台交互获取文件HASH值失败", infoObj.msg);
                                fn&&fn ( new sxca_ceb.business.busMsgObj("1", infoObj.msg, ""));
                            }
                        },
                        error: function(status){
                            fn&&fn(new sxca_ceb.business.busMsgObj("1", "与印章平台交互获取文件HASH值失败", "网络状态:"+status));
                        }
                    });
                }else {
                    sxca_ceb.journal.logInfo("获取文件HASH值", "与印章平台交互获取文件HASH值失败", msgObj.msg);
                    fn&&fn( new sxca_ceb.business.busMsgObj("1", msgObj.msg, ""));
                }
            } else {
                sxca_ceb.journal.logInfo("获取文件HASH值", "与印章平台交互获取文件HASH值失败", "请求头处理失败");
                fn&&fn(new sxca_ceb.business.busMsgObj("1", "请求头处理失败", ""));
            }
        })
    }
    var getFileHash = function (str) {
        var address = getHashAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    var message = sxca_ceb.http.synAjax({
                        type: "POST",//请求方式
                        contentType: 'application/json;charset=utf-8',//请求格式
                        defaultvar: sxca_ceb.http.getDefaultvar(),
                        somevar: somevar,
                        asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
                        url: address,
                        data: sxca_ceb.cipher.appEnc(str)
                    });
                    var info = sxca_ceb.cipher.appDec(message);
                    var infoObj = sxca_ceb.util.json_strToObj(info);
                    if (infoObj.code == 200) {
                        sxca_ceb.journal.logInfo("获取文件HASH值", "与印章平台交互获取文件HASH值成功", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("0", "获取文件hash值成功", infoObj.data);
                    } else {
                        sxca_ceb.journal.logInfo("获取文件HASH值", "与印章平台交互获取文件HASH值失败", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
                    }
                } else {
                    sxca_ceb.journal.logInfo("获取文件HASH值", "与印章平台交互获取文件HASH值失败", msgObj.msg);
                    return new sxca_ceb.business.busMsgObj("1", msgObj.msg, "");
                }
            } else {
                sxca_ceb.journal.logInfo("获取文件HASH值", "与印章平台交互获取文件HASH值失败", "请求头处理失败");
                return new sxca_ceb.business.busMsgObj("1", "与印章平台交互获取文件HASH值失败", "");
            }
        })

    };


    var pagingSignGetHash = function (str) {
        var address = getPagingSignAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    var message = sxca_ceb.http.synAjax({
                        type: "POST",//请求方式
                        contentType: 'application/json;charset=utf-8',//请求格式
                        defaultvar: sxca_ceb.http.getDefaultvar(),
                        somevar: somevar,
                        asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
                        url: address,
                        data: sxca_ceb.cipher.appEnc(str)
                    });
                    var info = sxca_ceb.cipher.appDec(message);
                    var infoObj = sxca_ceb.util.json_strToObj(info);
                    if (infoObj.code == 200) {
                        sxca_ceb.journal.logInfo("骑缝章签署获取文件HASH值", "与印章平台交互获取文件HASH值成功", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("0", "骑缝章签署获取文件HASH值成功", infoObj.data);
                    } else {
                        sxca_ceb.journal.logInfo("骑缝章签署获取文件HASH值", "与印章平台交互获取文件HASH值失败", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
                    }
                } else {
                    sxca_ceb.journal.logInfo("骑缝章签署获取文件HASH值", "与印章平台交互获取文件HASH值失败", msgObj.msg);
                    return new sxca_ceb.business.busMsgObj("1", msgObj.msg, "");
                }
            } else {
                sxca_ceb.journal.logInfo("骑缝章签署获取文件HASH值", "与印章平台交互获取文件HASH值失败", "请求头处理失败");
                return new sxca_ceb.business.busMsgObj("1", "与印章平台交互获取文件HASH值失败", "");
            }
        })
    };

    var saveSignCertAsyn = function (fileFlag, signData, isLast,fn) {
        var requestBody = {};
        requestBody.fileFlag = fileFlag;
        requestBody.signData = signData;
        requestBody.isLast = isLast;
        var address = signCertAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    sxca_ceb.http.asynAjax({
                        type:"POST",//请求方式
                        contentType:'application/json;charset=utf-8',//请求格式
                        defaultvar:sxca_ceb.http.getDefaultvar(),
                        somevar:somevar,
                        asynchronous:true,//是否异步 (同步请求将锁住浏览器)
                        url: address,
                        data:sxca_ceb.cipher.appEnc(sxca_ceb.util.json_objToStr(requestBody)),
                        success: function(message){
                            var info = sxca_ceb.cipher.appDec(message);
                            var infoObj = sxca_ceb.util.json_strToObj(info);
                            if (infoObj.code == 200) {
                                sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成成功", infoObj.msg);
                                fn&&fn ( new sxca_ceb.business.busMsgObj("0", "获取文件hash值成功", infoObj));
                            } else {
                                sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成失败", infoObj.msg);
                                fn&&fn ( new sxca_ceb.business.busMsgObj("1", infoObj.msg, ""));
                            }

                        },
                        error: function(status){
                            fn&&fn(new sxca_ceb.business.busMsgObj("1", "与印章平台交互文件签名合成失败", "网络状态:"+status));
                        }
                    });
                } else {
                    sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成失败", msgObj.msg);
                    fn&&fn(new sxca_ceb.business.busMsgObj("1", msgObj.msg, ""));
                }
            } else {
                sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成失败", "请求头处理失败");
                fn&&fn( new sxca_ceb.business.busMsgObj("1", "请求头处理失败", ""));
            }
        })

    };
    var saveSignCert = function (fileFlag, signData, isLast) {
        var requestBody = {};
        requestBody.fileFlag = fileFlag;
        requestBody.signData = signData;
        requestBody.isLast = isLast;
        var address = signCertAddress();
        sxca_ceb.http.somevarInit(function (msgObj){
            if (msgObj) {
                if (msgObj.flag == 0) {
                    var somevar = sxca_ceb.http.getSomevar();
                    var message = sxca_ceb.http.synAjax({
                        type: "POST",//请求方式
                        contentType: 'application/json;charset=utf-8',//请求格式
                        defaultvar: sxca_ceb.http.getDefaultvar(),
                        somevar: somevar,
                        asynchronous: false,//是否异步 (同步请求可能会锁住浏览器)
                        url: address,
                        data: sxca_ceb.cipher.appEnc(sxca_ceb.util.json_objToStr(requestBody))
                    });
                    var info = sxca_ceb.cipher.appDec(message);
                    var infoObj = sxca_ceb.util.json_strToObj(info);
                    if (infoObj.code == 200) {
                        sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成成功", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("0", "获取文件hash值成功", infoObj);
                    } else {
                        sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成失败", infoObj.msg);
                        return new sxca_ceb.business.busMsgObj("1", infoObj.msg, "");
                    }
                } else {
                    sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成失败", msgObj.msg);
                    return new sxca_ceb.business.busMsgObj("1", msgObj.msg, "");
                }
            } else {
                sxca_ceb.journal.logInfo("文件签名合成", "与印章平台交互文件签名合成失败", "请求头处理失败");
                return new sxca_ceb.business.busMsgObj("1", "与印章平台交互文件签名合成失败", "");
            }
        })

    };
    var getFileHashAndSignCert=function (j,length,strArr,sealIds,procbg,callback) {
        var strSeal = strArr[j];
        var sealImgId = sealIds[j];
        ++j;
        var initSeals = sxca_ceb.current.getInitSeals();
        var sealImg = document.getElementById(sealImgId);
        var sealId = sealImg.getAttribute("sealflag");
        var certDN = "";
        for (var i = 0; i < initSeals.length; i++) {
            if (initSeals[i].sealId == sealId) {
                certDN = initSeals[i].certSubject;
                break;
            }
        }
        if(certDN && certDN != null && certDN != ""){
            var cert = jit_ceb.business.getCertInfo(1,certDN);
            if(typeof cert != "object"){
                sxca_ceb.ui._popupClose(procbg);
                sxca_ceb.journal.logInfo("文件签署印章获取hash并签名合成", "未获取到签章的证书信息" + cert, "");
                sxca_ceb.ui._alert("第【"+j+"】个印章保存失败，页面验证证书异常");
                callback(new sxca_ceb.business.busMsgObj("1", "文件盖章失败", ""));
                return;
            }
        }else{
            sxca_ceb.ui._popupClose(procbg);
            sxca_ceb.journal.logInfo("文件签署印章获取hash并签名合成", "未获取到签章的证书信息", "");
            sxca_ceb.ui._alert("第【"+j+"】个印章保存失败，未获取到签章的证书，请重新插入key操作");
            callback(new sxca_ceb.business.busMsgObj("1", "文件盖章失败", ""));
            return;
        }
        getFileHashAsyn(strSeal,function(busObj){
            if (busObj && busObj.code == "0") {
                var sh = busObj.result.sh;
                jit_ceb.business.P1SignBase64Str(sh,function(msgObj){
                    if (msgObj && msgObj.flag == 0 && msgObj.data != null && msgObj.data != "") {
                        var digest = msgObj.data;
                        var strObj = sxca_ceb.util.json_strToObj(strSeal);
                        var isLast;
                        if (j == length) {
                            isLast = 1;
                        } else {
                            isLast = 0;
                        }
                        saveSignCertAsyn(strObj.fileFlag, digest, isLast,function(signCertBusObj){
                            if (signCertBusObj && signCertBusObj.code == "0") {
                                sxca_ceb.ui._popupUpdContent("批量电子印章保存中，共【"+length+"】个印章，已合成【"+j+"】个,请耐心等待...");
                                sxca_ceb.current.pushReturnCertSeals(signCertBusObj.result);
                                if(isLast == 1) {
                                    sxca_ceb.ui._popupUpdContent("批量电子印章保存，文件已合成，正在刷新...");
                                    sxca_ceb.sealUI.pageRefresh(null, strArr, sealIds);
                                    sxca_ceb.ui._popupClose(procbg);
                                    callback(new sxca_ceb.business.busMsgObj("0", "文件盖章成功", ""));
                                    return;
                                }else {
                                    getFileHashAndSignCert(j,length,strArr,sealIds,procbg,callback);
                                }
                            } else {
                                sxca_ceb.ui._popupClose(procbg);
                                sxca_ceb.journal.logInfo("文件签署印章获取hash并签名合成", "与印章平台交互，签名合成失败", signCertBusObj.msg);
                                sxca_ceb.ui._alert("第【"+j+"】个印章合成失败," + signCertBusObj.msg);
                                callback(new sxca_ceb.business.busMsgObj("1", "文件盖章失败", ""));
                                return;
                            }
                        });
                    }else {
                        sxca_ceb.ui._popupClose(procbg);
                        sxca_ceb.ui._alert("第【"+j+"】个印章签名失败，请联系管理员查看");
                        sxca_ceb.journal.logInfo("文件签署印章获取hash并签名合成", "vctk进行签名失败" + msgObj.msg + "，签名值：" + msgObj.data, "");
                        callback(new sxca_ceb.business.busMsgObj("1", "文件盖章失败", ""));
                        return;
                    }
                });
            }else {
                sxca_ceb.ui._popupClose(procbg);
                sxca_ceb.ui._alert("获取第【"+j+"】个印章HASH失败，" + busObj.msg);
                sxca_ceb.journal.logInfo("文件签署印章获取hash并签名合成", "与印章平台交互,获取文件hash值失败", busObj.msg);
                callback(new sxca_ceb.business.busMsgObj("1", "文件盖章失败", ""));
                return;
            }
        });
    }
    var getPagingSignFileHashAndSignCert = function (str) {
        if (str) {
            var pageRange;
            var signCertResultObj;
            var cert;
            if (sxca_ceb.current.isNullOfCert() == true) {
                cert = jit_ceb.business.getCertInfo();
                if (cert == undefined) {
                    sxca_ceb.journal.logInfo("文件签署印章获取hash并签名合成", "未获取到签章的证书信息", "");
                    return;
                }
            }
            //先获取hash
            var busObj = pagingSignGetHash(str);
            if (busObj && busObj.code == "0") {
                var sh = busObj.result.sh;
                var digest;
                if (sh != "") {
                    //获取摘要成功，进行签名
                    jit_ceb.business.P1SignBase64Str(sh, function (msgObj) {
                        if (msgObj) {
                            if (msgObj.flag == 0) {
                                digest = msgObj.data;
                            } else {
                                return;
                            }
                        } else {
                            return;
                        }
                    })
                }
                if (digest != null && digest != "") {
                    var strObj = sxca_ceb.util.json_strToObj(str);
                    pageRange = strObj.pageRange;
                    var isLast = 1;
                    var signCertBusObj = saveSignCert(strObj.fileFlag, digest, isLast);
                    if (signCertBusObj && signCertBusObj.code == "0") {
                        signCertResultObj = signCertBusObj.result;
                    } else {
                        sxca_ceb.journal.logInfo("文件签署骑缝章印章获取hash并签名合成", "与印章平台交互，签名合成失败", signCertBusObj.msg);
                        return;
                    }
                } else {
                    sxca_ceb.journal.logInfo("文件签署骑缝章印章获取hash并签名合成", "vctk进行签名失败，签名值为空", "");
                    return;
                }
            } else {
                sxca_ceb.journal.logInfo("文件签署骑缝章印章获取hash并签名合成", "与印章平台交互,获取文件hash值失败", busObj.msg);
                return;
            }
            sxca_ceb.sealUI.pagingSignPageRefresh(signCertResultObj, pageRange);
            sxca_ceb.journal.logInfo("文件签署骑缝章印章获取hash并签名合成", "获取文件hash值、进行签名合成、刷新签章页面成功", "");
            return;
        } else {
            sxca_ceb.journal.logInfo("文件签署骑缝章印章获取hash并签名合成", "待签名信息为空", "");
            return;
        }
    };

    return {
        getMultUserSealArrayBySyn: getMultUserSealArrayBySyn,
        getMultUserSealArrayByAsyn: getMultUserSealArrayByAsyn,
        getSealArrayBySyn: getSealArrayBySyn,
        getSealSeverTime: getSealSeverTime,
        searchKeyWordPosition: searchKeyWordPosition,
        getFileParamInfo: getFileParamInfo,
        getFileParamInfoAsyn:getFileParamInfoAsyn,
        getLoadFileImgAddress: getLoadFileImgAddress,
        loadVerifyInfo: loadVerifyInfo,
        loadVerifyInfoAsyn:loadVerifyInfoAsyn,
        getCurrentPDFPageCount: getCurrentPDFPageCount,
        getCurrentPDFPageWidth: getCurrentPDFPageWidth,
        getCurrentPDFPageHeight: getCurrentPDFPageHeight,
        getFileHashAndSignCert: getFileHashAndSignCert,
        getPagingSignFileHashAndSignCert: getPagingSignFileHashAndSignCert,
    };
}());

/*****************************************************************
 用于用到的js原生方法较多，为便于后续代码维护有必要对其进行封装
 *****************************************************************/

sxca_ceb.base = (function (w) {
    var addEvent = function (ele, type, fn) {
        if (ele.addEventListener) {
            addEvent = function (ele, type, fn) {//DOM2.0
                ele.addEventListener(type, fn, false);
            }

        } else if (ele.attachEvent) {//IE5+
            addEvent = function (ele, type, fn) {
                ele.attachEvent(type, fn);
            }
        } else {
            addEvent = function (ele, type, fn) {////DOM 0
                ele["on" + type] = fn;
            }
        }
        //执行
        addEvent(ele, type, fn.bind(ele));

    };
    var removeEvent = function (ele, type, fn) {
        if (ele.removeEventListener) {
            removeEvent = function (ele, type, fn) {
                ele.removeEventListener(type, fn, false);
            }

        } else if (ele.detachEvent) {
            removeEvent = function (ele, type, fn) {
                ele.detachEvent(type, fn);
            }
        } else {
            removeEvent = function (ele, type, fn) {
                ele["on" + type] = null;//删除事件处理程序
            }

        }
        removeEvent(ele, type, fn);
    };

    var cancelBubble = function (e) {

        var evt = e || event;
        // 阻止冒泡
        evt.cancelBubble = true;
        evt.stopPropagation();
    };

    function get(id) {
        function getObj(id) {

            this.ele = document.getElementById(id);
            return this;
        };

        getObj.prototype.html = function (val) {

            this.ele.innerHTML = val;
            return this;
        };
        getObj.prototype.val = function () {

            return this.ele.innerHTML;
        };
        getObj.prototype.attr = function (key, val) {//添加设置属性的方法
            this.ele.setAttribute(key, val);
            return this;
        };
        getObj.prototype.css = function (key, val) {//添加设置样式的方法
            this.ele.style[key] = val;
            return this;
        };
        getObj.prototype.on = function (event, fun) {
            //this.ele.addEventListener(event,fun,false);
            addEvent(this.ele, event, fun);
            return this;
        };

        return new getObj(id);
    };

    function gets(name) {
        function getobjs(name) {
            this.el = document.getElementsByName(name);
            return this;
        };
        getobjs.prototype.ons = function (event, fun) {
            for (var i = 0; i < this.el.length; i++) {
                //this.el[i].addEventListener(event,fun.bind(this,i,this.el[i],this.el),false);
                addEvent(this.el[i], event, fun.bind(this, i, this.el[i], this.el));

            }
            return this;
        };
        return new getobjs(name);
    };

    function getsByClass(name, tagName) {
        function getElementsByClassName2(className, tagName) {
            var ele = [], all = document.getElementsByTagName(tagName || "*");
            for (var i = 0; i < all.length; i++) {
                if (all[i].className == className) {
                    ele[ele.length] = all[i];
                }
            }
            return ele;
        };

        function getobjs2(name, tagName) {
            this.el = getElementsByClassName2(name, tagName);
            return this;
        };
        getobjs2.prototype.ons = function (event, fun) {

            for (var i = 0; i < this.el.length; i++) {
                //this.el[i].addEventListener(event,fun.bind(this,i,this.el[i],this.el),false);
                addEvent(this.el[i], event, fun.bind(this, i, this.el[i], this.el));

            }

            return this;
        };
        return new getobjs2(name, tagName);
    };

    function getId(id) {
        return document.getElementById(id);
    };

    function getName(name) {
        return document.getElementsByName(name);
    };

    function getTagName(tag) {
        return document.getElementsByTagName(tag);
    };

    function createEle(tag) {
        return document.createElement(tag);
    };

    function setAttr(ele, key, value) {
        ele.setAttribute(key, value);
    };

    function getElementsByClassName(className, tagName) {
        var ele = [], all = document.getElementsByTagName(tagName || "*");
        for (var i = 0; i < all.length; i++) {
            if (all[i].className == className) {
                ele[ele.length] = all[i];
            }
        }
        return ele;
    };
    w.$$ = w.get = get;
    return {
        get: get,
        gets: gets,
        getName: getName,
        getTagName: getTagName,
        getId: getId,
        createEle: createEle,
        setAttr: setAttr,
        addEvent: addEvent,
        removeEvent: removeEvent,
        cancelBubble: cancelBubble,
        getElementsByClassName: getElementsByClassName,
        getsByClass: getsByClass
    };
})(window);
/*****************************************************************
 在调用vctk控件前,需要先进行初始化，包括浏览器判定，动态加载控件
 *****************************************************************/

sxca_ceb.ready = (function () {


    var loadIeObject = function () {
        var scriptNode = sxca_ceb.base.createEle("object");
        sxca_ceb.base.setAttr(scriptNode, "id", sxca_ceb.constant.getValue().vctkId);
        sxca_ceb.base.setAttr(scriptNode, "classid", "clsid:B0EF56AD-D711-412D-BE74-A751595F3633");
        sxca_ceb.journal.logInfo("IE浏览器", "加载COM组件", "控件加载成功");
        sxca_ceb.base.getTagName("head")[0].appendChild(scriptNode);

    };

    var init = function (pdfBase64) {
        //禁止网页右键菜单，又要禁鼠标拖动，禁止鼠标选中拖动对象信息进入其他对象
        document.onselectstart = sxca_lock;
        document.oncontextmenu = sxca_lock;
        document.ondragover = sxca_lock;

        function sxca_lock() {
            event.returnValue = false;
        }

        if (sxca_ceb.util.getBrowser() == "IE") {
            loadIeObject();
        }

        sxca_ceb.sealUI.setInitImg();//初始化页面内置图片
        // sxca_ceb.sealUI.selectSealType();//盖章类型选择
        // sxca_ceb.sealUI.batchSignAddSeal();
        // sxca_ceb.sealUI.batchSignSaveSeal();
        // sxca_ceb.sealUI.batchSignDelSeal();
        // sxca_ceb.sealUI.selectSealMode();//盖章方式选择
        // sxca_ceb.sealUI.slideSeal();//骑缝章上下调整
        sxca_ceb.sealUI.searchTxtControl();//跳转页控制
        sxca_ceb.sealUI.signleSignSureSeal();//普通盖章确认选择事件绑定
        sxca_ceb.sealUI.printmeFileControl();//打印文件事件绑定
        sxca_ceb.sealUI.switchSeals();
        // sxca_ceb.sealUI.pagingSignDirectionChange();//骑缝章 签章方向发生改变
        //参数初始化
        var versionRes = sxca_ceb.business.getVctkVersion();
        if(versionRes && versionRes.code == "0"){
            var certSubjectStr = jit_ceb.business.getCertInfoList();
            if(certSubjectStr && certSubjectStr != null && certSubjectStr != ""){
                return new sxca_ceb.business.busMsgObj("0","电子签章初始化成功","");
            }else{
                sxca_ceb.ui._alert("初始化未获取到证书");
                return new sxca_ceb.business.busMsgObj("1","电子签章初始化失败，未获取到证书","");
            }
        }else{
            sxca_ceb.ui._alert(versionRes.msg);
            return new sxca_ceb.business.busMsgObj("1","电子签章初始化失败，控件信息异常，"+versionRes.msg,"");
        }
    };
    var getPositionInit = function () {
        //禁止网页右键菜单，又要禁鼠标拖动，禁止鼠标选中拖动对象信息进入其他对象
        document.onselectstart = sxca_lock;
        document.oncontextmenu = sxca_lock;
        document.ondragover = sxca_lock;

        function sxca_lock() {
            event.returnValue = false;
        }
        if (sxca_ceb.util.getBrowser() == "IE") {
            loadIeObject();
        }
        sxca_ceb.sealUI.setInitImg();//初始化页面内置图片
        // sxca_ceb.sealUI.fileOpen();
        sxca_ceb.sealUI.searchTxtControl();//跳转页控制
        sxca_ceb.sealUI.switchSeals();
    };
    var multSealSignInit = function () {

        //禁止网页右键菜单，又要禁鼠标拖动，禁止鼠标选中拖动对象信息进入其他对象
        document.onselectstart = sxca_lock;
        document.oncontextmenu = sxca_lock;
        document.ondragover = sxca_lock;

        function sxca_lock() {
            event.returnValue = false;
        }

        if (sxca_ceb.util.getBrowser() == "IE") {
            loadIeObject();
        }
        sxca_ceb.sealUI.setInitImg();//初始化页面内置图片
        sxca_ceb.sealUI.batchSignAddSeal();
        sxca_ceb.sealUI.batchSignSaveSeal();
        sxca_ceb.sealUI.batchSignDelSeal();
        sxca_ceb.sealUI.searchTxtControl();//跳转页控制
        sxca_ceb.sealUI.printmeFileControl();//打印文件事件绑定
        sxca_ceb.sealUI.switchSeals();
        //设置不允许拖拽印章
        sxca_ceb.switch.setSealDrag(0);
        //参数初始化
        var versionRes = sxca_ceb.business.getVctkVersion();
        if(versionRes && versionRes.code == "0"){
            var certSubjectStr = jit_ceb.business.getCertInfoList();
            if(certSubjectStr && certSubjectStr != null && certSubjectStr != ""){
                return new sxca_ceb.business.busMsgObj("0","电子签章初始化成功","");
            }else{
                sxca_ceb.ui._alert("初始化未获取到证书");
                return new sxca_ceb.business.busMsgObj("1","电子签章初始化失败，未获取到证书","");
            }
        }else{
            sxca_ceb.ui._alert(versionRes.msg);
            return new sxca_ceb.business.busMsgObj("1","电子签章初始化失败，控件信息异常，"+versionRes.msg,"");
        }
    };
    return {
        init: init,
        getPositionInit: getPositionInit,
        multSealSignInit: multSealSignInit,
    };
}());
/*****************************************************************
 供第三方应用调用集成的印章显示UI
 *****************************************************************/

sxca_ceb.sealUI = (function () {

    var printmeFileControl = function () {

    };
    var signleSignSureSeal = function () {
        var sureSeal = sxca_ceb.base.getId("sxca_ceb_sure");
        sxca_ceb.base.addEvent(sureSeal, "click", function (e) {
            if (sxca_ceb.business.getCurrentNoComposeSealsNum() >= sxca_ceb.switch.getCurrentSealSum()) {
                sxca_ceb.ui._alert("请先保存当前签章！");
                return;
            }
            var sealObjArr = sxca_ceb.current.getInitSeals();
            var sealIndex = -1;
            var sealXRangeWidth = sxca_ceb.chapter.getCurrentPDFPageWidth()
            var sealYRangeHeight = sxca_ceb.chapter.getCurrentPDFPageHeight()
            var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
            var currentSeal = sealsRange.children[0];
            var currentSealId = currentSeal.getAttribute("flag");
            for (var j = 0; j < sealObjArr.length; j++) {
                if (sealObjArr[j].sealId == currentSealId) {
                    sealIndex = j;
                    sealXRangeWidth = parseInt(sealXRangeWidth) - Math.floor(parseInt(sealObjArr[j].sealWidth) / 10 * 39);
                    sealYRangeHeight = parseInt(sealYRangeHeight) - Math.floor(parseInt(sealObjArr[j].sealHeight) / 10 * 39) - 4;
                    var sealType = sxca_ceb.current.getSealType();
                    if (sealType && sealType != null && sealType != '') {
                        if (sealType != sealObjArr[j].sealType) {
                            sxca_ceb.ui._alert("本次签署所需印章类型与选中印章的类型不一致");
                        }
                    }
                    break;
                }
            }
            var sealParam = sxca_ceb.current.getSealParam();
            if (sealParam.sealPage == '' || sealParam.sealX == '' || sealParam.sealY == '') {
                sxca_ceb.ui._alert("普通盖章设置为不允许拖拽印章时，请设置完成签章参数（签章页码、签章坐标X、签章坐标Y）");
                return;
            }
            if (parseInt(sealParam.sealPage) < 0 || parseInt(sealParam.sealPage) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("页码超出文档页码范围");
                return;
            }
            if (parseInt(sealParam.sealX) < 0 || parseInt(sealParam.sealX) > sealXRangeWidth) {
                sxca_ceb.ui._alert("横坐标超出页面范围");
                return;
            }
            if (parseInt(sealParam.sealY) < 0 || parseInt(sealParam.sealY) > sealYRangeHeight) {
                sxca_ceb.ui._alert("纵坐标超出页面范围");
                return;
            }

            var allPage = document.getElementsByClassName("sxca-page-box");
            var currentItem = allPage[sealParam.sealPage - 1];

            var seal = sxca_ceb.base.createEle("div");
            var sealP = sxca_ceb.base.createEle("div");
            var sealOper = sxca_ceb.base.createEle("div");

            sealP.appendChild(seal);
            sealP.appendChild(sealOper);

            var point = sxca_ceb.util.getPoint(currentItem);
            var psnd = point.split(";");
            var item_left = parseInt(psnd[0]);
            var item_top = parseInt(psnd[1]);
            var w = parseInt(currentItem.offsetWidth, 10),
                h = parseInt(currentItem.offsetHeight, 10),
                l = parseInt(item_left, 10),
                t = parseInt(item_top, 10);
            var sent = {
                l: l,
                r: l + w,
                t: t,
                b: t + h,
                n: 10
            };
            sxca_ceb.sealUI.showSeal(sealP, currentItem, sealObjArr, sealIndex, sealParam.sealX, sealParam.sealY, sent);
        });
    };
    var searchTxtControl = function () {
        var sxca_seach_text = sxca_ceb.base.getId("sxca_seach_text2");
        // var position_signPageStart=sxca_ceb.base.getId("position_signPageStart");
        // var position_signPageEnd=sxca_ceb.base.getId("position_signPageEnd");
        // var position_signX=sxca_ceb.base.getId("position_signX");
        // var position_signY=sxca_ceb.base.getId("position_signY");
        // var qifeng_start_width=sxca_ceb.base.getId("qifeng_start_width");
        sxca_ceb.base.addEvent(sxca_seach_text, "keyup", function (e) {
            if (this.value.length == 1) {
                this.value = this.value.replace(/[^1-9]/g, '')
            } else {
                this.value = this.value.replace(/\D/g, '')
                if (this.value == 0) {
                    this.value = this.value.replace(/[^1-9]/g, '');
                }
            }
        });
        // sxca_ceb.base.addEvent(position_signPageStart,"keyup",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(position_signPageEnd,"keyup",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(position_signX,"keyup",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(position_signY,"keyup",function(e){
        // 	if(this.value.length==1){
        //
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(qifeng_start_width,"keyup",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        sxca_ceb.base.addEvent(sxca_seach_text, "afterpaste", function (e) {
            if (this.value.length == 1) {
                this.value = this.value.replace(/[^1-9]/g, '')
            } else {
                this.value = this.value.replace(/\D/g, '')
                if (this.value == 0) {
                    this.value = this.value.replace(/[^1-9]/g, '');
                }
            }
        });
        //
        // sxca_ceb.base.addEvent(position_signPageStart,"afterpaste",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(position_signPageEnd,"afterpaste",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(position_signX,"afterpaste",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(position_signY,"afterpaste",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
        // sxca_ceb.base.addEvent(qifeng_start_width,"afterpaste",function(e){
        // 	if(this.value.length==1){
        // 		this.value=this.value.replace(/[^1-9]/g,'')
        // 	}else{this.value=this.value.replace(/\D/g,'')
        // 		if(this.value==0){
        // 			this.value=this.value.replace(/[^1-9]/g,'');
        // 		}
        // 	}
        // });
    };
    var fileOpen = function () {
        var cebFileOpen = sxca_ceb.base.getId("cebFileOpen");
        sxca_ceb.base.addEvent(cebFileOpen, "click", function (e) {
            if (document.getElementsByClassName("sxca_sealImg").length > 0) {
                var com = confirm("有未保存的印章，重新打开文件，将清除这些印章，确定重新打开吗？");
                if (com == false) {
                    return;
                }
                sxca_ceb.util.removeAllSeal();
            }
            var businessId = sxca_ceb.base.getId("fileFlag").value;
            if (businessId != null && businessId != "" && businessId != undefined) {
                sxca_ceb.business.loadFile(businessId);
                var coordinatePositionBoxes = sxca_ceb.base.getId("coordinate-position-boxes");
                if (coordinatePositionBoxes != undefined) {
                    var positionBoxes = coordinatePositionBoxes.children;
                    if (positionBoxes != undefined && positionBoxes.length > 0) {
                        coordinatePositionBoxes.innerHTML = "";
                    }
                }
            } else {
                sxca_ceb.journal.logInfo("根据文档标识打开文档", "打开文件", "请输入文档标识，再进行打开文件操作");
                sxca_ceb.ui._alert("请输入文档标识，再进行打开文件操作");
                return;
            }
        });
    };
    var setInitImg = function () {
        var sxca_ceb_pre = sxca_ceb.base.getId("sxca_ceb_pre");//left.png
        sxca_ceb_pre.style.background = "url('data:image/png;base64," + sxca_ceb.constant.getValue().sealLeftImg + "') center no-repeat";
        var sxca_ceb_next = sxca_ceb.base.getId("sxca_ceb_next");//right.png
        sxca_ceb_next.style.background = "url('data:image/png;base64," + sxca_ceb.constant.getValue().sealRightImg + "') center no-repeat";

        var sxca_seals_refresh = sxca_ceb.base.getId("sxca_seals_refresh");//refresh_ico.png
        sxca_seals_refresh.style.background = "url('data:image/png;base64," + sxca_ceb.constant.getValue().sealRefreshImg + "') center no-repeat";

        // var sxca_qifeng_select=sxca_ceb.base.getId("sxca_qifeng_select");//select_ico.png
        // sxca_qifeng_select.style.background="url('data:image/png;base64,"+sxca_ceb.constant.getValue().qifengSelect +"') no-repeat scroll 95% 50% transparent";

        var sxca_seach_btn = sxca_ceb.base.getId("sxca_seach_btn2");//seach_ico.png
        sxca_seach_btn.style.background = "url('data:image/png;base64," + sxca_ceb.constant.getValue().seachImg + "') center no-repeat #55b7e5";

        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");// noseal.png
        sealsRange.innerHTML = '<img src="data:image/png;base64,' + sxca_ceb.constant.getValue().nosealImg + ' " flag=' + (-1) + '>';
        var fileRange = sxca_ceb.base.getId(sxca_ceb.constant.getValue().refreDom);
        fileRange.style.background = "url('data:image/png;base64," + sxca_ceb.constant.getValue().nofileImg + "') center no-repeat";
        fileRange.style.height = "100%";

        var sxca_signature_right_list = sxca_ceb.base.getElementsByClassName('sxca-signature-right-list', 'ul');
        sxca_signature_right_list[0].style.background = "url('data:image/png;base64," + sxca_ceb.constant.getValue().nofileslImg + "') center no-repeat";
        sxca_signature_right_list[0].style.height = "100%";
    };
    var pagingSignDirectionChange = function () {
        var ele = sxca_ceb.base.getId("sxca_qifeng_select");
        ele.onchange = function () {
            var sealS = document.getElementsByClassName("sxca_sealImg");
            if (sealS != null && sealS.length > 0) {
                sxca_ceb.util.removeAllSeal();
                sxca_ceb.base.getId("sxca_ceb_confirm").click();
            }
        }
    };
    //获取元素的绝对位置
    var getPosition = function (node) {
        var left = node.offsetLeft; //获取元素相对于其父元素的left值var left
        var top = node.offsetTop;
        current = node.offsetParent; // 取得元素的offsetParent
        // 一直循环直到根元素
        while (current != null) {
            left += current.offsetLeft;
            top += current.offsetTop;
            current = current.offsetParent;
        }

        return {
            "left": left,
            "top": top
        };
    };
    //下拉控制
    var selectSealMode = function () {
        var select = sxca_ceb.base.getId("sxca_ceb_selectId");
        select.onchange = function () {
            if (document.getElementsByClassName("sxca_sealImg").length > 0) {
                var com = confirm("有未保存的印章，切换盖章方式之后，将清除这些印章，确定切换方式吗？");
                if (com == false) {

                    for (var i = 1; i < 4; i++) {
                        if (document.getElementById("signet-form" + i).style.display == "block") {
                            document.getElementById("sxca_ceb_selectId").value = document.getElementById("option" + i).value;
                            break;
                        }
                    }
                    return;
                }
            }
            var options = select.getElementsByTagName("option");
            for (var i = 0; i < options.length; i++) {
                if (options[i].selected) {
                    var optionId = options[i].id.replace("option", "signet-form");
                    var signetForm = sxca_ceb.base.getElementsByClassName("sxca-websignet-form");
                    for (var j = 0; j < signetForm.length; j++) {
                        if (optionId == signetForm[j].id) {
                            signetForm[j].style.display = "block";
                        } else {
                            signetForm[j].style.display = "none";
                        }
                    }
                    if (options[i].id == "option3") {
                        document.getElementById("sxca_ceb_delete").style.display = "block";
                    } else {
                        document.getElementById("sxca_ceb_delete").style.display = "none";
                    }
                }
            }
            sxca_ceb.util.removeAllSeal();
        }
    };
    var slideSeal = function () {
        /**滑动图片的效果*/
        var lineDiv_y = sxca_ceb.base.getId('lineDiv-y'); //长线条
        var minDiv_y = sxca_ceb.base.getId('minDiv-y'); //小方块
        var imgcss = sxca_ceb.base.getId("imgcss");
        var ifBool = false; //判断鼠标是否按下
        //鼠标按下方块
        sxca_ceb.base.addEvent(minDiv_y, "mousedown", function (e) {
            e.stopPropagation();
            ifBool = true;
        });
        //拖动
        sxca_ceb.base.addEvent(window, "mousemove", function (e) {
            if (!ifBool && sxca_ceb.switch.getSealDrag() == 0) {//！ifBool的功能是当拖动的是骑缝章的调整条的时候允许拖动
                return;
            }
            if (ifBool) {
                if (!e.touches) {
                    var x = e.clientX;
                } else {
                    var x = e.touches[0].pageX;
                }
                var lineDiv_left = getPosition(lineDiv_y).left; //长线条的横坐标
                var minDiv_left = x - lineDiv_left; //小方块相对于父元素（长线条）的left值

                if (minDiv_left >= lineDiv_y.offsetWidth - 15) {
                    minDiv_left = lineDiv_y.offsetWidth - 15;
                }
                if (minDiv_left < 0) {
                    minDiv_left = 0;
                }
                //设置拖动后小方块的left值
                minDiv_y.style.left = minDiv_left + "px";

                var minDivLeft = parseInt(minDiv_y.style.left);
                var offset = minDivLeft / (lineDiv_y.offsetWidth - 15);//滑块所占比例


                var eles = document.getElementsByClassName("sxca_sealImg");
                var sxca_qifeng_select = document.getElementById("sxca_qifeng_select").value;
                for (var j = eles.length - 1; j >= 0; j--) {
                    if (sxca_qifeng_select == "left" || sxca_qifeng_select == "right") {
                        eles[j].style.top = (sxca_ceb.chapter.getCurrentPDFPageHeight() - parseInt(eles[j].style.height) - 5) * offset + "px";
                    }
                    if (sxca_qifeng_select == "top" || sxca_qifeng_select == "bottom") {
                        eles[j].style.left = (sxca_ceb.chapter.getCurrentPDFPageWidth() - parseInt(eles[j].style.width)) * offset + "px";
                    }
                }

            }

        });
        sxca_ceb.base.addEvent(window, "mouseup", function (e) {
            ifBool = false;
        });

    };

    /**
     * 校对左侧印章显示
     */
    var proofreadPanelLeft = function(){
        var sealObjArr = sxca_ceb.current.getInitSeals();
        var MaxWidth = Math.floor(parseInt(sealObjArr[0].sealWidth) / 10 * 39);
        for (var i = 0; i < sealObjArr.length; i++) {
            var width = Math.floor(parseInt(sealObjArr[i].sealWidth) / 10 * 39);
            if(width && width > MaxWidth){
                MaxWidth = width;
            }
        }
        if(MaxWidth > 150){
            var imgBoxDivs = sxca_ceb.base.getElementsByClassName("signet-switch-imgBox", "div");
            if(imgBoxDivs){
                for (var i = 0; i < imgBoxDivs.length; i++) {
                    var div = imgBoxDivs[i]
                    div.style.width=MaxWidth+"px";
                    div.style.height=MaxWidth+"px";
                    div.style.lineHeight=MaxWidth+"px";
                }
            }
            var imgBoxDivs1 = sxca_ceb.base.getElementsByClassName("sxca-panel-center", "div");
            if(imgBoxDivs1){
                for (var i = 0; i < imgBoxDivs1.length; i++) {
                    var div = imgBoxDivs1[i]
                    div.style.left=(MaxWidth + 150)+"px";
                }
            }

            var imgBoxDivs2 = sxca_ceb.base.getElementsByClassName("sxca-panel-left", "div");
            if(imgBoxDivs2){
                for (var i = 0; i < imgBoxDivs2.length; i++) {
                    var div = imgBoxDivs2[i]
                    div.style.width=(MaxWidth + 149)+"px";
                }
            }
        }
    };
    //印章左右切换
    var switchSeals = function () {

        var pre_btn = sxca_ceb.base.getId("sxca_ceb_pre");
        var next_btn = sxca_ceb.base.getId("sxca_ceb_next");
        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
        //设置数组的索引下标
        var index = 0;
        //获取标识标签
        var signet_id = sxca_ceb.base.getId("signet_id");
        //绑定事件
        sxca_ceb.base.addEvent(pre_btn, "click", function (e) {
            var sealObjArr = sxca_ceb.current.getInitSeals();
            if (sealObjArr.length == 0) {
                return;
            }
            index--;//切换到上一张索引自减
            //判断索引是否小于0
            if (index < 0) {
                index = sealObjArr.length - 1;//实现循环切换
            }
			var w = Math.floor(parseInt(sealObjArr[index].sealWidth) / 10 * 39)
			var h = Math.floor(parseInt(sealObjArr[index].sealHeight) / 10 * 39)
			sealsRange.innerHTML = '<img src="data:image/jpg;base64,' + sealObjArr[index].sealBase64 + ' " flag=' + sealObjArr[index].sealId + ' width="'+w+'px" height="'+h+'px">';

            //当点击按钮以后，重新设置p标签中的显示内容
            signet_id.innerHTML = "(" + (index + 1) + "/" + sealObjArr.length + ")";
            if (sxca_ceb.switch.getSealDrag() == 0) {//是批量
                if (document.getElementById("sxca_ceb_selectId").value == "paging") {
                    var sealS = document.getElementsByClassName("sxca_sealImg");
                    if (sealS != null && sealS.length > 0) {
                        sxca_ceb.util.removeAllSeal();
                        sxca_ceb.base.getId("sxca_ceb_confirm").click();
                        ;
                    }
                }
            }

        });
        sxca_ceb.base.addEvent(next_btn, "click", function (e) {
            var sealObjArr = sxca_ceb.current.getInitSeals();
            if (sealObjArr.length == 0) {
                return;
            }
            index++;//切换到下一张索引自加
            //判断索引是否大于4
            if (index > sealObjArr.length - 1) {
                index = 0;//目的是可以实现循环切换
            }
			var w = Math.floor(parseInt(sealObjArr[index].sealWidth) / 10 * 39)
			var h = Math.floor(parseInt(sealObjArr[index].sealHeight) / 10 * 39)
			sealsRange.innerHTML = '<img src="data:image/jpg;base64,' + sealObjArr[index].sealBase64 + ' " flag=' + sealObjArr[index].sealId + ' width="'+w+'px" height="'+h+'px">';
            //当点击按钮以后，重新设置p标签中的显示内容
            signet_id.innerHTML = "(" + (index + 1) + "/" + sealObjArr.length + ")";
            if (sxca_ceb.switch.getSealDrag() == 0) {//是批量
                var sxca_ceb_select = sxca_ceb.base.getId("sxca_ceb_selectId");
                if (sxca_ceb_select != undefined && sxca_ceb_select.value == "paging") {
                    var sealS = document.getElementsByClassName("sxca_sealImg");
                    if (sealS != null && sealS.length > 0) {
                        sxca_ceb.util.removeAllSeal();
                        sxca_ceb.base.getId("sxca_ceb_confirm").click();
                        ;
                    }
                }
            }
        });

    };
    //加载虚框与事件
    var loadComposeSealEvent = function (verRes, item, currentPage) {
        if (verRes && verRes.length > 0) {
            var sealObj;
            //console.log("获取加载虚框的个数:"+verRes.length);
            for (var i = 0; i < verRes.length; i++) {
                sealObj = verRes[i];
                //创建对应的虚拟div
                var virtualDiv = sxca_ceb.base.createEle("div");
                virtualDiv.className = "virtualDiv";
                sxca_ceb.base.setAttr(virtualDiv, "isOld", true);
                sxca_ceb.base.setAttr(virtualDiv, "sealFlag", sealObj.sealId);
                sxca_ceb.base.setAttr(virtualDiv, "signName", sealObj.signName);
                // virtualDiv.style.width=parseInt(sealObj.sealWidth)+"px";
                // virtualDiv.style.height=parseInt(sealObj.sealHeight)+"px";
                virtualDiv.style.width = Math.floor(parseInt(sealObj.sealWidth) / 10) * 40 + "px";
                virtualDiv.style.height = Math.floor(parseInt(sealObj.sealHeight) / 10) * 40 + "px";
                virtualDiv.style.left = parseInt(sealObj.x) + "px";
                virtualDiv.style.top = parseInt(sealObj.y) + "px";
                virtualDiv.style.zIndex = sxca_ceb.constant.getValue().zIndexNum - 1;
                sxca_ceb.constant.subIndexNum();
                virtualDiv.style.position = "absolute";
                //virtualDiv.className="sxca-sealv-style";
                item.appendChild(virtualDiv);
            }

        }
        var itemChilds = item.children;

        //给虚框添加事件
        var tooltipDiv = sxca_ceb.base.getElementsByClassName('sxca-tooltip-box2', 'div');
        var msg = "验签成功";
        var tipImg = '<span style="background:url(data:image/png;base64,' + sxca_ceb.constant.getValue().yesImg + ') left center no-repeat">' + msg + '</span>';
        for (var i = 0; i < itemChilds.length; i++) {
            if (itemChilds[i].tagName != 'IMG') {
                if (itemChilds[i].getAttribute('isold') == "true") {
                    itemChilds[i].onmouseleave = function (e) {
                        tooltipDiv[0].style.display = "none";
                    };
                    itemChilds[i].onmouseenter = function (e) {
                        //这里需要获取当前div下的对应的印章证书对象
                        var currentSignName = this.getAttribute("signname");
                        var certSealObj = sxca_ceb.current.getCertSealBySignName(currentSignName, currentPage);
                        if (certSealObj.success == 'true') {
                            class02 = "sxca-yes-validation";
                            msg = "验签成功";
                            tipImg = '<span style="background:url(data:image/png;base64,' + sxca_ceb.constant.getValue().yesImg + ') left center no-repeat">' + msg + '</span>';
                        } else {
                            class02 = "sxca-no-validation";
                            msg = "验签失败";
                            tipImg = '<span style="background:url(data:image/png;base64,' + sxca_ceb.constant.getValue().noImg + ') left center no-repeat">' + msg + '</span>';
                        }
                        var tipDiv = "";
                        tipDiv += '<div class="sxca-tip-head ' + class02 + '" >';
                        tipDiv += tipImg;
                        tipDiv += '</div>';
                        tipDiv += '<div class="sxca-tip-body">';
                        tipDiv += '<span>签章信息</span>';
                        tipDiv += '<p>';
                        tipDiv += '<span>签章名称：</span><span>' + certSealObj.sealName + '</span><br>';
                        tipDiv += '<span>签章时间：</span><span>' + certSealObj.time + '</span>';
                        tipDiv += '</p>';
                        tipDiv += '<hr class="sxca-tip-hr">';
                        tipDiv += '<span>证书信息</span>';
                        tipDiv += '<p>';
                        tipDiv += '<span>证书序列号：</span><span>' + certSealObj.certSn + '</span><br>';
                        tipDiv += '<span>证书主题：</span><span>' + certSealObj.dn + '</span><br>';
                        tipDiv += '<span>颁发者主题：</span><span>' + certSealObj.issuer + '</span><br>';
                        tipDiv += '<span>有效开始时间：</span><span>' + certSealObj.notBefore + '</span><br>';
                        tipDiv += '<span>有效终止时间：</span><span>' + certSealObj.notAfter + '</span>';
                        tipDiv += ' </p>';
                        tipDiv += '</div>';
                        tooltipDiv[0].innerHTML = tipDiv;
                        tooltipDiv[0].style.display = "block";
                        //这里需要做显示处理,否则会出现外部页面显示滚动条，显示信息框被遮盖的情况
                        //var tooltipDivStyle=sxca_ceb.util.getStylePropertyValue(tooltipDiv[0], null);//没有style属性不能用此方法
                        var x = e.clientX;
                        var y = e.clientY;
                        var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
                        var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
                        var o = {
                            top: (y),
                            left: (x),
                            bottom: (h - y),
                            right: (w - x)
                        };
                        var popH = tooltipDiv[0].offsetHeight + 14;
                        var popW = tooltipDiv[0].offsetWidth + 14;

                        var topflag = 0, leftflag = 0, rightflag = 0, bottomflag = 0;
                        if (o.bottom > popH) {
                            topflag = 1;
                            if (o.right > popW && o.left <= popW) {
                                topflag = 0;
                                leftflag = 1;
                            } else if (o.right <= popW) {
                                topflag = 0;
                                rightflag = 1;
                            } else {
                                topflag = 1;
                            }
                        } else {
                            bottomflag = 1;
                        }

                        if (bottomflag) {
                            tooltipDiv[0].style.top = (o.top - popH) + "px";
                            tooltipDiv[0].style.left = o.left + "px";

                        } else if (leftflag) {
                            tooltipDiv[0].style.left = (o.left + 14) + "px";

                            if (o.top < 40) {
                                tooltipDiv[0].style.top = "0px";
                            } else {
                                tooltipDiv[0].style.top = (o.top - 40) + "px";

                            }
                        } else if (rightflag) {

                            tooltipDiv[0].style.left = (o.left - popW - 14) + "px";

                            if (o.top < 40) {
                                tooltipDiv[0].style.top = "0px";

                            } else {
                                tooltipDiv[0].style.top = (o.top - 40) + "px";

                            }
                        } else {
                            tooltipDiv[0].style.top = (o.top + 14) + "px";
                            tooltipDiv[0].style.left = o.left + "px";

                        }
                        //------------------------------------------------------------------------

                    };

                }
            }
        }

    };
    //盖章完成后进行页面的局部刷新
    var pageRefresh = function (returnObj, strArr, sealIds) {

        returnObj = sxca_ceb.current.getReturnCertSeals();
        var allPage = document.getElementsByClassName("sxca-page-box");
        for (var j = 0; j < returnObj.length; j++) {
            var signCertResultObj = returnObj[j];
            sxca_ceb.current.setCertSeals(signCertResultObj);

            //需要动态处理当前页面的链接地址
            var strObj = sxca_ceb.util.json_strToObj(strArr[j]);
            var item = allPage[strObj.currentPageNo - 1];
            var index = parseInt(item.getAttribute("index"));
            var sxca_docItem = sxca_ceb.base.getElementsByClassName('sxca-docItem', 'div');
            var oldZtUrl = item.children[0].getAttribute("data-url");
            var oldSlUrl = sxca_docItem[index - 1].style.background;

            var in01 = oldZtUrl.indexOf("=");
            var middle01 = oldZtUrl.substring(0, in01);
            var in02 = signCertResultObj.newFileName.indexOf(".")
            var middle02 = signCertResultObj.newFileName.substring(0, in02);
            var newZtUrl = middle01 + '=' + middle02 + '_' + (100 + index) + '_yt';

            item.children[0].setAttribute("data-url", newZtUrl);
            item.children[0].src = newZtUrl;

            var in03 = oldSlUrl.indexOf("=");
            var middle03 = oldSlUrl.substring(0, in03);
            var middle05 = oldSlUrl.substring(in03);
            var in04 = middle05.indexOf(")");
            var middle04 = middle05.substring(in04);
            var newSlUrl = middle03 + '=' + middle02 + '_' + (100 + index) + '_sl"' + middle04;
            sxca_docItem[index - 1].style.background = newSlUrl;
            //删除原有印章的div
            var sealP = document.getElementById(sealIds[j]);
            sealP.parentNode.removeChild(sealP);

            //在添加虚拟框之前先判定当前页下面有没有虚拟框，如果有则删除
            var itemChilds = item.children;
            var oldNum = 0;
            if (itemChilds.length > 0) {
                //console.log("原有当前页存在虚拟框个数为:"+(itemChilds.length-1));
                for (var i = itemChilds.length - 1; i >= 0; i--) {
                    if (itemChilds[i].tagName == 'IMG') {//排除当前页的img对象(文件图片)
                        continue;

                    } else {//如果未保存的章有多个，当下只执行保存了一个章，需要过滤其它章的情况
                        if (itemChilds[i].getAttribute('isold') == "false") {
                            oldNum++;
                            continue;
                        }
                        item.removeChild(itemChilds[i]);
                    }
                }
            }

            //console.log("虚框处理剩余个数"+(item.children.length-1-oldNum));
            //通过返回信息创建所有已经合成印章的虚拟div,并绑定事件
            var verList = signCertResultObj.verifyList;
            var verRes;
            if (verList.length > 0) {
                for (var i = 0; i < verList.length; i++) {
                    if (parseInt(verList[i].currentPage) == index) {
                        verRes = verList[i];
                        break;
                    }
                }
                sxca_ceb.sealUI.loadComposeSealEvent(verRes.perVerifyRes, item, index);
            }
        }
        sxca_ceb.current.setReturnCertSealsNull();
    };

    var pagingSignPageRefresh = function (signCertResultObj, pageRange) {
        //刷新页面
        var allPage = document.getElementsByClassName("sxca-page-box");
        sxca_ceb.current.setCertSeals(signCertResultObj);

        //需要动态处理当前页面的链接地址
        for (var i = 0; i < pageRange.length; i++) {
            for (var j = pageRange[i][0]; j <= pageRange[i][1]; j++) {
                var item = allPage[j - 1];
                var index = parseInt(item.getAttribute("index"));
                var sxca_docItem = sxca_ceb.base.getElementsByClassName('sxca-docItem', 'div');
                var oldZtUrl = item.children[0].getAttribute("data-url");
                var oldSlUrl = sxca_docItem[index - 1].style.background;

                var in01 = oldZtUrl.indexOf("=");
                var middle01 = oldZtUrl.substring(0, in01);
                var in02 = signCertResultObj.newFileName.indexOf(".")
                var middle02 = signCertResultObj.newFileName.substring(0, in02);
                var newZtUrl = middle01 + '=' + middle02 + '_' + (100 + index) + '_yt';

                item.children[0].setAttribute("data-url", newZtUrl);
                item.children[0].src = newZtUrl;

                var in03 = oldSlUrl.indexOf("=");
                var middle03 = oldSlUrl.substring(0, in03);
                var middle05 = oldSlUrl.substring(in03);
                var in04 = middle05.indexOf(")");
                var middle04 = middle05.substring(in04);
                var newSlUrl = middle03 + '=' + middle02 + '_' + (100 + index) + '_sl"' + middle04;
                sxca_docItem[index - 1].style.background = newSlUrl;
            }
        }
        item = allPage[pageRange[0][0] - 1];
        //删除原有印章的div
        sxca_ceb.util.removeAllSeal();

        //在添加虚拟框之前先判定当前页下面有没有虚拟框，如果有则删除
        var itemChilds = item.children;
        var oldNum = 0;
        if (itemChilds.length > 0) {
            //console.log("原有当前页存在虚拟框个数为:"+(itemChilds.length-1));
            for (var i = itemChilds.length - 1; i >= 0; i--) {
                if (itemChilds[i].tagName != 'IMG') {//排除当前页的img对象(文件图片)
                    item.removeChild(itemChilds[i]);
                }
            }
        }

        //console.log("虚框处理剩余个数"+(item.children.length-1-oldNum));
        //通过返回信息创建所有已经合成印章的虚拟div,并绑定事件
        var verList = signCertResultObj.verifyList;
        var verRes;
        if (verList.length > 0) {
            for (var i = 0; i < verList.length; i++) {
                if (parseInt(verList[i].currentPage) == pageRange[0][0]) {
                    verRes = verList[i];
                    break;
                }
            }
            sxca_ceb.sealUI.loadComposeSealEvent(verRes.perVerifyRes, item, pageRange[0][0]);
        }
    }
    //页面滚动
    var pagescroll = function () {

        var arrOffsetTop = [];
        var fTotalHgt = 0;
        var arrOffsetTop2 = [];
        var fTotalHgt2 = 0;


        var deviationHeight = 48;
        var devTop = 61;
        var deviationHeight2 = 98;
        var devTop2 = 102;
        var fAverageHgt = 0;//获取每个div页的平均高度
        var sxcaPageBox = sxca_ceb.base.getElementsByClassName('sxca-page-box', 'div');
        var sxca_docItem = sxca_ceb.base.getElementsByClassName('sxca-docItem', 'div');
        var domId = sxca_ceb.constant.getValue().refreDom;

        var fileRange = sxca_ceb.base.getId(domId);

        var fileRangeS = sxca_ceb.base.getId(domId);
        if (sxcaPageBox) {
            if (sxcaPageBox.length > 0) {
                for (var i = 0; i < sxcaPageBox.length; i++) {
                    arrOffsetTop.push(sxcaPageBox[i].offsetTop + deviationHeight);
                    fTotalHgt += sxcaPageBox[i].offsetHeight;
                }
                fAverageHgt = parseFloat(fTotalHgt / sxcaPageBox.length);

            } else {
                //指定默认图片
                //fileRange.innerHTML='<img src="data:image/jpg;base64,'+ sxca_ceb.constant.getValue().nofileImg+'">';//不需要
            }

        } else {
            //指定默认图片
            //fileRange.innerHTML='<img src="data:image/jpg;base64,'+ sxca_ceb.constant.getValue().nofileImg+'">';//不需要

        }

        if (sxca_docItem) {
            if (sxca_docItem.length > 0) {
                for (var i = 0; i < sxca_docItem.length; i++) {
                    //console.log(sxca_docItem[i].offsetTop);
                    arrOffsetTop2.push(sxca_docItem[i].offsetTop + deviationHeight2);
                    fTotalHgt2 += sxca_docItem[i].offsetHeight;
                }
                fAverageHgt2 = parseFloat(fTotalHgt2 / sxca_docItem.length);

            } else {
                //指定默认缩放图片
                //fileRange.innerHTML='<img src="data:image/jpg;base64,'+ sxca_ceb.constant.getValue().nofileImg+'">';//不需要
            }

        } else {
            //指定默认缩放图片
            //fileRange.innerHTML='<img src="data:image/jpg;base64,'+ sxca_ceb.constant.getValue().nofileImg+'">';//不需要

        }

        // 滚动事件(每次滚动都做一次循环判断)
        var sxca_panel_center = sxca_ceb.base.getElementsByClassName('sxca-panel-center', 'div');
        var sxca_signature_right_list = sxca_ceb.base.getElementsByClassName('sxca-signature-right-list', 'ul');
        var sxca_signature_right_list_childs = sxca_signature_right_list[0].children;
        var sxca_list_box = sxca_ceb.base.getElementsByClassName('sxca-list-box', 'div');
        var domId = sxca_ceb.constant.getValue().refreDom;
        var divPageP = sxca_ceb.base.getId(domId);
        var fileInfo = sxca_ceb.current.getFileInfo();
        sxca_ceb.base.addEvent(sxca_panel_center[0], "scroll", function (e) {
            var signCertResultObj = sxca_ceb.current.getCertSeals();
            var verList;
            if (signCertResultObj) {
                verList = signCertResultObj.verifyList;
            }
            if (sxcaPageBox) {
                var virtualDivList = document.getElementsByClassName("virtualDiv");
                for (var j = virtualDivList.length - 1; j > 0; j--) {
                    virtualDivList[j].parentNode.removeChild(virtualDivList[j]);
                }
                for (var i = 0; i < sxcaPageBox.length; i++) {

                    if (sxca_panel_center[0].scrollTop > arrOffsetTop[i] - fAverageHgt) {// 减去一个固定值，是定位准确点
                        //sxca_signature_right_list_childs[i].classList.add("active");//classList存在兼容性问题
                        sxca_signature_right_list_childs[i].setAttribute("class", "active");
                        if (sxca_ceb.switch.getLazyLoad() == 1) {
                            //文件图懒加载
                            divPageP.children[i].children[0].src = divPageP.children[i].children[0].getAttribute("data-url");//懒加载
                            divPageP.children[i].children[0].setAttribute("lazy", "loaded");
                            //缩略图懒加载
                            //sxca_signature_right_list_childs[i].children[0].style.background=sxca_signature_right_list_childs[i].children[0].getAttribute("data-url");
                            //sxca_signature_right_list_childs[i].children[0].setAttribute("lazy","loaded");

                            //在选中的页面添加虚框及事件

                            if (fileInfo.isSign == 1) {
                                if (signCertResultObj) {
                                    var verRes;
                                    if (verList && verList.length > 0) {
                                        for (var j = 0; j < verList.length; j++) {
                                            if (parseInt(verList[j].currentPage) == (i + 1)) {
                                                verRes = verList[j];
                                                break;
                                            }
                                        }
                                        if (verRes.currentPage == (i + 1)) {
                                            loadComposeSealEvent(verRes.perVerifyRes, divPageP.children[i], (i + 1));
                                        }
                                    }
                                }
                            }

                        }
                        for (var j = 0; j < sxcaPageBox.length; j++) {
                            if (i == j) {

                                continue;
                            } else {
                                //sxca_signature_right_list_childs[j].classList.remove("active");
                                sxca_signature_right_list_childs[j].setAttribute("class", "");

                            }
                        }
                        sxca_list_box[0].scrollTop = sxca_signature_right_list_childs[i].offsetTop - devTop2;
                    }
                }
            }
            //在滚动的过程中需要实时调整所有电子印章的位置
            //var imgDivs=sxca_ceb.base.getElementsByClassName("sxca_sealImg","div");
            //var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
            //console.log(document.documentElement.scrollTop +"---"+window.pageYOffset+"----"+ document.body.scrollTop);
            //console.log(sxca_panel_center[0].scrollTop);
            //if(imgDivs.length>0){
            //for(var i=0;i<imgDivs.length;i++){
            //console.log(imgDivs[i].style.top+"-----"+sxca_panel_center[0].scrollTop);
            //imgDivs[i].style.top=(parseInt(imgDivs[i].style.top)+sxca_panel_center[0].scrollTop)+"px";
            //imgDivs[i].style.left=(left2+parseInt(seal.left))+"px";

            // }
            //}
        });
        //点击事件
        var sxca_ceb_startBtn = sxca_ceb.base.getId("sxca_ceb_startBtn2");

        sxca_ceb.base.addEvent(sxca_ceb_startBtn, "click", function (e) {
            if (sxcaPageBox) {
                for (var i = 0; i < sxcaPageBox.length; i++) {

                    if (i == 0) {
                        sxca_signature_right_list_childs[i].setAttribute("class", "active");
                    } else {
                        sxca_signature_right_list_childs[i].setAttribute("class", "");
                    }


                }

            }
            sxca_ceb.util.animate(sxca_panel_center[0], {scrollTop: (arrOffsetTop[0] - devTop)}, 500);
            sxca_ceb.util.animate(sxca_list_box[0], {scrollTop: (arrOffsetTop2[0] - devTop2)}, 500);

        });


        var sxca_ceb_lastBtn = sxca_ceb.base.getId("sxca_ceb_lastBtn2");
        sxca_ceb.base.addEvent(sxca_ceb_lastBtn, "click", function (e) {

            if (sxcaPageBox) {
                for (var i = 0; i < sxcaPageBox.length; i++) {
                    if (i == (sxcaPageBox.length - 1)) {

                        sxca_signature_right_list_childs[i].setAttribute("class", "active");
                    } else {

                        sxca_signature_right_list_childs[i].setAttribute("class", "");
                    }

                }

            }

            sxca_ceb.util.animate(sxca_panel_center[0], {scrollTop: (arrOffsetTop[sxcaPageBox.length - 1] - devTop)}, 500);
            sxca_ceb.util.animate(sxca_list_box[0], {scrollTop: (arrOffsetTop2[sxcaPageBox.length - 1] - devTop2)}, 500);


        });

        sxca_ceb.base.getsByClass("sxca-docItem", "div").ons("click", function (index, item, itemList) {
            if (sxcaPageBox) {

                for (var i = 0; i < itemList.length; i++) {
                    if (i == index) {
                        sxca_signature_right_list_childs[i].setAttribute("class", "active");
                    } else {
                        sxca_signature_right_list_childs[i].setAttribute("class", "");
                    }

                }

            }
            sxca_ceb.util.animate(sxca_panel_center[0], {scrollTop: (arrOffsetTop[index] - devTop)}, 500);
            sxca_ceb.util.animate(sxca_list_box[0], {scrollTop: (arrOffsetTop2[index] - devTop2)}, 500);

        });

        var sxca_seach_btn = sxca_ceb.base.getId("sxca_seach_btn2");
        var sxca_seach_text2 = sxca_ceb.base.getId("sxca_seach_text2");
        sxca_ceb.base.addEvent(sxca_seach_btn, "click", function (e) {
            if (!sxca_seach_text2.value) {
                return;
            }
            var currentPage = 1;
            var len = sxca_signature_right_list_childs.length;
            if (len > 0) {
                if (sxca_seach_text2.value > len) {
                    sxca_seach_text2.value = len;//最大页码
                    currentPage = len;
                } else {
                    currentPage = sxca_seach_text2.value;
                }
                var index = currentPage - 1;
                for (var i = 0; i < len; i++) {
                    if (i == index) {
                        sxca_signature_right_list_childs[i].setAttribute("class", "active");
                    } else {
                        sxca_signature_right_list_childs[i].setAttribute("class", "");
                    }

                }
                sxca_ceb.util.animate(sxca_panel_center[0], {scrollTop: (arrOffsetTop[index] - devTop)}, 500);
                sxca_ceb.util.animate(sxca_list_box[0], {scrollTop: (arrOffsetTop2[index] - devTop2)}, 500);

            }
        });

    };

    //盖章方式选择
    var selectSealType = function () {
        var sealTypeSelect = sxca_ceb.base.getName("sxca_ceb_sealType");
        var signetForm = sxca_ceb.base.getElementsByClassName("sxca-websignet-form");

        for (var i = 0; i < sealTypeSelect.length; i++) {
            sxca_ceb.base.addEvent(sealTypeSelect[i], "click", function (e) {
                if ('sxca_ceb_sealType_1' == e.target.id) {//普通盖章
                    if (sxca_ceb.switch.getSealDrag() == 1) {
                        return;
                    }
                    if (document.getElementsByClassName("sxca_sealImg").length > 0) {
                        var com = confirm("有未保存的印章，切换盖章模式之后，将清除这些印章，确定切换模式吗？");
                        if (com == false) {
                            document.getElementById("sxca_ceb_sealType_2").click();
                            return;
                        }
                    }
                    sxca_ceb.switch.setSealDrag(1);
                    sxca_ceb.switch.setSignTypeNormal();
                    sxca_ceb.base.getId('sxca_ceb_sealType_select').style.display = 'none';
                    sxca_ceb.base.getId('sxca_ceb_confirm').style.display = 'none';
                    sxca_ceb.base.getId('sxca_ceb_save').style.display = 'none';
                    sxca_ceb.base.getId('sxca_ceb_delete').style.display = 'none';
                    for (var j = 0; j < signetForm.length; j++) {
                        signetForm[j].style.display = "none";
                    }
                    /*******************/
                    var select = sxca_ceb.base.getId("sxca_ceb_selectId");
                    var options = select.getElementsByTagName("option");
                    for (var i = 0; i < options.length; i++) {
                        if (i == 0) {
                            options[i].selected = true;
                        } else {
                            options[i].selected = false;
                        }
                    }
                    /*********************/
                    var coordinatePositionForm = sxca_ceb.base.getId("coordinate-position-form");
                    if (coordinatePositionForm) {
                        coordinatePositionForm.style.display = "block";
                    }
                } else if ('sxca_ceb_sealType_2' == e.target.id) {//批量盖章
                    if (sxca_ceb.switch.getSealDrag() == 0) {
                        return;
                    }
                    if (document.getElementsByClassName("sxca_sealImg").length > 0) {
                        var com = confirm("有未保存的印章，切换盖章模式之后，将清除这些印章，确定切换模式吗？");
                        if (com == false) {
                            document.getElementById("sxca_ceb_sealType_1").click();
                            return;
                        }
                    }
                    sxca_ceb.base.getId('sxca_ceb_sealType_select').style.display = 'block';
                    sxca_ceb.base.getId('sxca_ceb_confirm').style.display = 'block';
                    sxca_ceb.base.getId('sxca_ceb_save').style.display = 'block';
                    sxca_ceb.switch.setSealDrag(0);
                    sxca_ceb.switch.setSignTypeBatch();
                    var select = sxca_ceb.base.getId("sxca_ceb_selectId").value;
                    if ("fixed" == select) {
                        signetForm[0].style.display = "block";
                    }
                    // for(var j = 0; j < signetForm.length; j++){ // optionId 未定义
                    // 	if(optionId == signetForm[j].id){
                    // 		alert(1)
                    // 		signetForm[j].style.display = "block";
                    // 	}else{
                    // 		alert(2)
                    // 		signetForm[j].style.display = "none";
                    // 	}
                    // }
                    var coordinatePositionForm = sxca_ceb.base.getId("coordinate-position-form");
                    if (coordinatePositionForm) {
                        coordinatePositionForm.style.display = "none";
                    }
                }
                sxca_ceb.util.removeAllSeal();
            });
        }
    };
    var verSignFail = function (sealDiv) {
        var len = sealDiv.children.length;
        if (len >= 2) {
            return;
        } else {
            var failImg = sxca_ceb.base.createEle("img");
            failImg.src = "data:image/png;base64," + sxca_ceb.constant.getValue().failImg;
            failImg.width = 76;
            failImg.height = 65;
            failImg.style.position = "relative";
            failImg.style.left = -116;
            failImg.style.top = -42;
            sealDiv.appendChild(failImg);
        }
    };
    var verSignSuccess = function (sealDiv) {
        var len = sealDiv.children.length;
        if (len >= 2) {
            sealDiv.removeChild(sealDiv.children[len - 1]);
        } else {
            return;
        }
    };
    //***************解决落章和拖拽印章时印章的重叠问题******************
    var judgeSameSeal = function (sealFlag) {//在版式文件判定印章重复还需要考虑版式文件内置印章与当前印章是否有重复的问题

        var sameNumber = 0;
        var imgDivs = sxca_ceb.base.getElementsByClassName("sxca_sealImg", "div");
        if (imgDivs.length > 0) {
            for (var i = 0; i < imgDivs.length; i++) {
                var sealFlagAlready = imgDivs[i].getAttribute('sealflag')
                if (sealFlag == sealFlagAlready) {
                    sameNumber++;

                } else {
                    continue;
                }
            }
        }

        if (sameNumber > 0) {
            if (sxca_ceb.switch.getSealOnly() == 1) {//表示相同印章只能出现一次
                sxca_ceb.ui._alert("选择印章已经使用，请选择其它印章");
                return sameNumber;

            } else {//如果允许同一印章出现多次，就需要做左上位置偏差处理
                return -1;
            }
        }
        return sameNumber;
    };
    //******************解决印章重叠问题******************************************
    var overlapHandle = function (readySealDiv, readyLeft, readyTop) {

        var num = 0;
        var deviation = 0;
        var imgDivs = sxca_ceb.base.getElementsByClassName("sxca_sealImg", "div");
        var readyW = readySealDiv.getAttribute('w');
        var readyH = readySealDiv.getAttribute('h');
        readyW = parseInt(readyW);
        if (readyW > 150) {
            readyW = 150;
        }
        readyH = parseInt(readyH);
        if (readyH > 150) {
            readyH = 150;
        }
        if (isNaN(readyLeft)) {
            readyLeft = 0;
        }
        if (isNaN(readyTop)) {
            readyTop = 0;
        }

        if (sxca_ceb.constant.getValue().leftOverlapSpace - sxca_ceb.constant.getValue().topOverlapSpace < 0) {
            deviation = sxca_ceb.constant.getValue().leftOverlapSpace;
        } else {
            deviation = sxca_ceb.constant.getValue().topOverlapSpace;
        }
        if (imgDivs.length > 0) {
            for (var i = 0; i < imgDivs.length; i++) {

                var point = sxca_ceb.util.getPoint(imgDivs[i]);
                var psnd = point.split(";");
                var left = parseInt(psnd[0]);
                var top = parseInt(psnd[1]);


                var a = Math.abs(left - readyLeft);
                var b = Math.abs(top - readyTop);
                var c = Math.sqrt(a * a + b * b);


                var m = readyW / 2 - deviation;
                var n = readyH / 2 - deviation;

                if (c <= readyW) {
                    num++;
                }
            }
        }
        return num;
    }
    var overlapDragHandle = function (pageBox, readySealDiv, readyLeft, readyTop) {


        var overlapTip = sxca_ceb.switch.getOverlapTip();
        if (overlapTip == 0) {
            return;
        }
        var readyId = readySealDiv.getAttribute('id');
        var readyW = Number.parseInt(readySealDiv.getAttribute('w'));
        var readyH = Number.parseInt(readySealDiv.getAttribute('h'));
        var readyleft = Number.parseInt(readySealDiv.style.left.replace('px', ''));
        var readytop = Number.parseInt(readySealDiv.style.top.replace('px', ''))
        var index = pageBox.getAttribute('index');
        readytop = readytop - (Number.parseInt(index) - 1) * 800;
        var virtualDivs = pageBox.getElementsByClassName("virtualDiv", "div");
        // var virtualDivs = pageBox.getElementsByClassName("sxca-sealv-style","div");

        var boxW = Number.parseInt(pageBox.style.width.replace('px', ''));
        var boxH = Number.parseInt(pageBox.style.height.replace('px', ''));


        var checkDiv;
        if (virtualDivs.length > 0) {
            for (var i = 0; i < virtualDivs.length; i++) {
                var left = Number.parseInt(virtualDivs[i].style.left.replace('px', ''));
                var top = Number.parseInt(virtualDivs[i].style.top.replace('px', ''));
                var width = Number.parseInt(virtualDivs[i].style.width.replace('px', ''));
                var height = Number.parseInt(virtualDivs[i].style.height.replace('px', ''));
                //在左右两侧不重叠
                if ((readyleft < left && readyleft + readyW <= left) || readyleft >= left + width) {
                    continue;
                }
                //在上下两侧不重叠
                if ((readytop < top && readytop + readyH <= top) || readytop >= top + height) {
                    continue;
                }
                checkDiv = virtualDivs[i];
                break;
            }

        }
        if (!checkDiv || checkDiv == null) {
            var sealImgDivs = pageBox.getElementsByClassName("sxca_sealImg", "div");
            if (sealImgDivs.length > 0) {
                for (var i = 0; i < sealImgDivs.length; i++) {
                    var divId = sealImgDivs[i].getAttribute('id');
                    if (divId == readyId) {
                        continue;
                    } else {
                        var left = Number.parseInt(sealImgDivs[i].style.left.replace('px', ''));
                        var top = Number.parseInt(sealImgDivs[i].style.top.replace('px', ''));
                        var width = Number.parseInt(sealImgDivs[i].style.width.replace('px', ''));
                        var height = Number.parseInt(sealImgDivs[i].style.height.replace('px', ''));
                        //在左右两侧不重叠
                        if ((readyleft < left && readyleft + readyW <= left) || readyleft >= left + width) {
                            continue;
                        }
                        //在上下两侧不重叠
                        if ((readytop < top && readytop + readyH <= top) || readytop >= top + height) {
                            continue;
                        }
                        checkDiv = sealImgDivs[i];
                        break;
                    }
                }
            }
        }
        if (checkDiv && checkDiv != null) {
            if (overlapTip == 1) {
                sxca_ceb.ui._alert("本次盖章存在印章重叠现象，请谨慎操作");
                return;
            }
            if (overlapTip == 2) {
                readySealDiv.parentNode.removeChild(readySealDiv);
                sxca_ceb.ui._alert("本次盖章存在印章重叠现象，请重新操作盖章");
                return;
            }
            if (overlapTip == 3) {
                // if(readySealDiv.parentNode){
                // 	readySealDiv.parentNode.removeChild(readySealDiv);
                // }
                // sxca_ceb.ui._alert("本次盖章存在印章重叠现象，进行校对");
                // var left = Number.parseInt(checkDiv.style.left.replace('px',''));
                // var top = Number.parseInt(checkDiv.style.top.replace('px',''));
                // var width = Number.parseInt(checkDiv.style.width.replace('px',''));
                // var height = Number.parseInt(checkDiv.style.height.replace('px',''));
                // var movel = 0,movet = 0, mover = 0,moveb = 0;
                // movet = readytop + readyH - top;
                // movel = readyleft + readyW - left;
                // mover = left + width - readyleft;
                // moveb = top + height - readytop;
                // if(left >= movel){
                // 	console.log("可以往左侧移动")
                // 	readyLeft = readyLeft - movel;
                // }else if(top >= movet){
                // 	console.log("可以往上侧移动")
                // 	readyTop = readyTop - movet;
                // }else if(boxW - left - width >= mover){
                // 	console.log("可以往右侧移动")
                // 	readyLeft = readyLeft + mover;
                // }else if(boxH - top - height >= moveb){
                // 	console.log("可以往下侧移动")
                // 	readyTop = readyTop + moveb;
                // }else{
                // 	console.log("计算错误")
                // }
                // console.log(readyLeft+ ";" + readyTop)
                // readySealDiv.style.left = readyLeft + "px";
                // readySealDiv.style.top = readyTop + "px";
                // overlapDragHandle(pageBox,readySealDiv,readyLeft,readyTop);
            }
        } else {
            // return readyLeft+ ";" + readyTop;
            // readySealDiv.style.left = readyLeft + "px";
            // readySealDiv.style.top = readyTop + "px";
        }
    }

    var overlapDragHandle_bak = function (readySealDiv, readyLeft, readyTop) {

        var num = 0;
        var deviation = 0;
        var imgDivs = sxca_ceb.base.getElementsByClassName("sxca_sealImg", "div");
        var readyW = readySealDiv.getAttribute('w');
        var readyH = readySealDiv.getAttribute('h');
        var readyId = readySealDiv.getAttribute('id');
        readyW = parseInt(readyW);
        if (readyW > 150) {
            readyW = 150;
        }
        readyH = parseInt(readyH);
        if (readyH > 150) {
            readyH = 150;
        }
        if (isNaN(readyLeft)) {
            readyLeft = 0;
        }
        if (isNaN(readyTop)) {
            readyTop = 0;
        }

        if (sxca_ceb.constant.getValue().leftOverlapSpace - sxca_ceb.constant.getValue().topOverlapSpace < 0) {
            deviation = sxca_ceb.constant.getValue().leftOverlapSpace;
        } else {
            deviation = sxca_ceb.constant.getValue().topOverlapSpace;
        }
        if (imgDivs.length <= 1) {
            return 0;
        } else {
            for (var i = 0; i < imgDivs.length; i++) {
                var divId = imgDivs[i].getAttribute('id');
                if (divId == readyId) {
                    continue;
                } else {
                    var point = sxca_ceb.util.getPoint(imgDivs[i]);
                    var psnd = point.split(";");
                    var left = parseInt(psnd[0]);
                    var top = parseInt(psnd[1]);
                    var a = Math.abs(left - readyLeft);
                    var b = Math.abs(top - readyTop);
                    var c = Math.sqrt(a * a + b * b);
                    if (c <= readyW) {
                        num++;
                    }
                }
            }
            return num;
        }

    }
    var myMouseDown = function (ev1) {
        console.log(123)
        //需要判定窗口是否有变化
        var defaultWidth = window.screen.width || window.screen.availWidth;
        var defaultHeight = window.screen.height || window.screen.availHeight;

        var nowWidth = document.documentElement.clientWidth;
        var nowHeight = document.documentElement.clientHeight;


        var windowOffsetWidth = defaultWidth - nowWidth;
        var windowOffsetHeight = defaultHeight - nowHeight;


        var item = ev1.target.parentNode.parentNode.parentNode;
        var it_point = sxca_ceb.util.getPoint(item);
        var it_psnd = it_point.split(";");
        var item_left = parseInt(it_psnd[0]);
        var item_top = parseInt(it_psnd[1]);
        var w_n = parseInt(item.offsetWidth, 10);
        var h_n = parseInt(item.offsetHeight, 10);

        var l_n = parseInt(item_left, 10);
        var t_n = parseInt(item_top, 10);
        var b_n = t_n + h_n;
        var r_n = l_n + w_n;


        var id = this.parentNode.getAttribute("id");
        var myseal = sxca_ceb.base.getId(id);
        var l = myseal.getAttribute("l");
        var b = myseal.getAttribute("b") - myseal.getAttribute("h") - 4;
        var r = myseal.getAttribute("r") - myseal.getAttribute("w");
        var t = myseal.getAttribute("t");
        if (windowOffsetWidth > 0 || windowOffsetHeight > 0) {//窗口发生变化
            l = l_n;
            b = b_n - myseal.getAttribute("h") - 4;
            r = r_n - myseal.getAttribute("w");
            t = t_n;
        }

        var point = sxca_ceb.util.getPoint(myseal);
        var psnd = point.split(";");
        var seal_left = parseInt(psnd[0]);

        var seal_top = parseInt(psnd[1]);

        var oevent1 = ev1 || event;
        var sentX = oevent1.pageX - seal_left;

        var sentY = oevent1.pageY - seal_top;

        document.onmousemove = function (ev) {
            // console.log("mousemove")
            if (sxca_ceb.switch.getSealDrag() == 0) {
                return;
            }
            var oEvent = ev || event;
            var slideLeft = oEvent.pageX - sentX;
            var slideTop = oEvent.pageY - sentY;
            if (slideLeft <= l) {
                slideLeft = l;
            }
            if (slideLeft >= r) {
                slideLeft = r;
            }
            if (slideTop <= t) {
                slideTop = t;
            }
            if (slideTop >= b) {
                slideTop = b;
            }

            myseal.style.left = (slideLeft - l) + 'px';
            myseal.style.top = (slideTop - t) + 'px';

            // overlapDragHandle(item, myseal, slideLeft - l, slideTop - t);


            var coordinatePositionBoxes = sxca_ceb.base.getId("coordinate-position-boxes");
            if (coordinatePositionBoxes != undefined) {
                var positionBoxes = coordinatePositionBoxes.children;
                if (positionBoxes != undefined && positionBoxes.length > 0) {
                    for (var i = 0; i < positionBoxes.length; i++) {
                        var perPosition = positionBoxes[i];
                        var index = perPosition.getAttribute("index");
                        if (myseal.getAttribute("id") == index) {
                            var inner = " <span> 印章标识:</span>" + myseal.getAttribute("sealflag") + ";<br><span>页码:</span>" + item.getAttribute("index") + ";<span>定位:</span><b>" + (slideLeft - l) + "</b>,<b>" + (slideTop - t) + "</b>";
                            perPosition.innerHTML = inner;
                        }
                    }
                }
            }
        };
        document.onmouseup = function () {
            document.onmousemove = null;
            document.onmouseup = null;
        };
        return false;
    };
    var showQiFengSeal = function (sealP, item, sealObjArr, sealIndex, subBase64, subW, subH, pLeft, pTop, sent) {
        var seal = sealP.children[0];
        seal.className = "sxca-seal-style";

        sealP.style.width = "auto";
        sealP.style.height = "auto";

        sxca_ceb.base.setAttr(sealP, "id", sxca_ceb.constant.getValue().sealImgId + "" + sxca_ceb.util.getCurrentTime());
        sxca_ceb.base.setAttr(sealP, "class", "sxca_sealImg");
        sxca_ceb.base.setAttr(sealP, "isOld", false);
        sxca_ceb.base.setAttr(sealP, "sealFlag", sealObjArr[sealIndex].sealId);


        sxca_ceb.base.setAttr(sealP, "do", sxca_ceb.constant.getValue().zIndexNum);
        sxca_ceb.base.setAttr(sealP, "na", (sxca_ceb.base64._utf8_encode(sealObjArr[sealIndex].sealName)));
        sxca_ceb.base.setAttr(sealP, "ty", (sxca_ceb.base64._utf8_encode(sealObjArr[sealIndex].sealType)));
        sxca_ceb.base.setAttr(sealP, "s", sealObjArr[sealIndex].size);
        sxca_ceb.base.setAttr(sealP, "w", subW);
        sxca_ceb.base.setAttr(sealP, "h", subH);

        sealP.style.zIndex = sxca_ceb.constant.getValue().zIndexNum;
        sealP.style.position = "absolute";
        sealP.style.width = subW + "px";
        sealP.style.height = subH + "px";
        sealP.style.left = pLeft + "px";
        sealP.style.top = pTop + "px";

        seal.innerHTML = '<img  src="' + subBase64 + '">';
        sxca_ceb.constant.subIndexNum();
        item.appendChild(sealP);


        var n = sent.n || 10;
        sealP.setAttribute("l", sent.l);
        sealP.setAttribute("b", sent.b);
        sealP.setAttribute("r", sent.r);
        sealP.setAttribute("t", sent.t);
        seal.onmousedown = myMouseDown;
    }

    var showSeal = function (sealP, item, sealObjArr, sealIndex, pLeft, pTop, sent) {
        var seal = sealP.children[0];
        seal.className = "sxca-seal-style";

        var sealOper = sealP.children[1];
        if(sxca_ceb.switch.getShowDelSealOper() == '1'){
            sealOper.style.border = "0px solid green";
            sealOper.style.height = "30px";
            sealOper.style.lineHeight = "30px";
            sealOper.className = "sxca-tooltip-box";

            var div1 = sxca_ceb.base.createEle("div");
            div1.className = "sxca-arrow";
            var span1 = sxca_ceb.base.createEle("span");
            span1.className = "sxca-t1";
            div1.appendChild(span1);
            var div2 = sxca_ceb.base.createEle("div");
            div2.className = "sxca-tool-tip";

            var deleteButton = sxca_ceb.base.createEle("a");
            deleteButton.innerHTML = "删除";

            div2.appendChild(deleteButton);

            sealOper.appendChild(div1);
            sealOper.appendChild(div2);

            if (deleteButton && deleteButton != null) {
                deleteButton.onclick = function (e) {
                    sealP.parentNode.removeChild(sealP);
                    var coordinatePositionBoxes = sxca_ceb.base.getId("coordinate-position-boxes");
                    if (coordinatePositionBoxes != undefined) {
                        var positionBoxes = coordinatePositionBoxes.children;
                        if (positionBoxes != undefined && positionBoxes.length > 0) {
                            for (var i = 0; i < positionBoxes.length; i++) {
                                var perPosition = positionBoxes[i];
                                var index = perPosition.getAttribute("index");
                                if (sealP.getAttribute("id") == index) {
                                    coordinatePositionBoxes.removeChild(perPosition);
                                }
                            }
                        }
                    }
                };
            }

            // if (saveButton && saveButton != null) {
            //     saveButton.onclick = function (e) {
            //         var procbg=sxca_ceb.ui._popupOpen("普通电子印章保存中，请耐心等待...");
            //         var currentPageNo = parseInt(item.getAttribute("index"));
            //         var fileInfo = sxca_ceb.current.getFileInfo();
            //         var x = parseInt(sealP.style.left);
            //         var y = parseInt(sealP.style.top);
            //         var sealObject = new sxca_ceb.trans.SealObj(sealObjArr[sealIndex].sealId, x, y, fileInfo.fileFlag, currentPageNo);
            //         sealObject.signType = "dragSign";
            //         sealObject.isLast = 1;
            //         var strArr = [];
            //         strArr.push(sxca_ceb.util.json_objToStr(sealObject))
            //         var sealIds = [];
            //         sealIds.push(sealP.getAttribute("id"));
            //         sxca_ceb.chapter.getFileHashAndSignCert(0,strArr.length, strArr,sealIds, procbg,function(obj){});
            //     };
            // }
        }

        sealP.style.width = "auto";
        sealP.style.height = "auto";

        sxca_ceb.base.setAttr(sealP, "id", sxca_ceb.constant.getValue().sealImgId + "" + sxca_ceb.util.getCurrentTime());
        sxca_ceb.base.setAttr(sealP, "class", "sxca_sealImg");
        sxca_ceb.base.setAttr(sealP, "isOld", false);
        sxca_ceb.base.setAttr(sealP, "sealFlag", sealObjArr[sealIndex].sealId);


        sxca_ceb.base.setAttr(sealP, "do", sxca_ceb.constant.getValue().zIndexNum);
        sxca_ceb.base.setAttr(sealP, "na", (sxca_ceb.base64._utf8_encode(sealObjArr[sealIndex].sealName)));
        sxca_ceb.base.setAttr(sealP, "ty", (sxca_ceb.base64._utf8_encode(sealObjArr[sealIndex].sealType)));
        sxca_ceb.base.setAttr(sealP, "s", sealObjArr[sealIndex].size);
        // sxca_ceb.base.setAttr(sealP,"w", sealObjArr[sealIndex].width);
        // sxca_ceb.base.setAttr(sealP,"h", sealObjArr[sealIndex].height);
        sxca_ceb.base.setAttr(sealP, "w", Math.floor(parseInt(sealObjArr[sealIndex].sealWidth) / 10 * 39));
        sxca_ceb.base.setAttr(sealP, "h", Math.floor(parseInt(sealObjArr[sealIndex].sealHeight) / 10 * 39));

        sealP.style.zIndex = sxca_ceb.constant.getValue().zIndexNum;
        sealP.style.position = "absolute";
        // sealP.style.width=sealObjArr[sealIndex].width+"px";
        // sealP.style.height=sealObjArr[sealIndex].height+"px";
        sealP.style.width = Math.floor(parseInt(sealObjArr[sealIndex].sealWidth) / 10 * 39) + "px";
        sealP.style.height = Math.floor(parseInt(sealObjArr[sealIndex].sealHeight) / 10 * 39) + "px";
        sealP.style.left = pLeft + "px";
        sealP.style.top = pTop + "px";

        seal.innerHTML = '<img  src="data:image/png;base64,' + sealObjArr[sealIndex].sealBase64 + '">';
        sxca_ceb.constant.subIndexNum();
        item.appendChild(sealP);


        var n = sent.n || 10;
        sealP.setAttribute("l", sent.l);
        sealP.setAttribute("b", sent.b);
        sealP.setAttribute("r", sent.r);
        sealP.setAttribute("t", sent.t);
        seal.onmousedown = myMouseDown;

        // var handleRes = overlapDragHandle(item, sealP, pLeft, pTop);

        var coordinatePositionBoxes = sxca_ceb.base.getId("coordinate-position-boxes");
        if (coordinatePositionBoxes != undefined) {
            var positionBox = sxca_ceb.base.createEle("div");
            positionBox.setAttribute("index", sealP.getAttribute("id"));
            positionBox.className = "position-box";
            var inner = " <span> 印章标识:</span>" + sealObjArr[sealIndex].sealId + ";<br><span>页码:</span>" + item.getAttribute("index") + ";<span>定位:</span><b>" + pLeft + "</b>,<b>" + pTop + "</b>";
            positionBox.innerHTML = inner;
            coordinatePositionBoxes.append(positionBox);
        }


        // sealP.onmouseenter = function () {
        //     sealOper.style.display = "block";
        //     this.onmouseleave = function () {
        //         setTimeout(function () {
        //             sealOper.style.display = "none";
        //         }, 100);
        //     };
        // }

    };
    var getRegion = function () {

        return sxca_ceb.base.getId(sxca_ceb.constant.getValue().refreDom);
        //return sxca_ceb.base.getId("sxca_ceb_middle");
        //return document;
        //return document.body;
    };
    var batchSignAddSeal = function () {
        var sxca_ceb_confirm = sxca_ceb.base.getId("sxca_ceb_confirm");
        sxca_ceb.base.addEvent(sxca_ceb_confirm, "click", function (e) {
            //根据盖章方式判断
            // sxca_ceb.ui._popupOpen("批量电子印章添加中，请耐心等待...");
            var select = sxca_ceb.base.getId("sxca_ceb_selectId");
            var options = select.getElementsByTagName("option");
            for (var i = 0; i < options.length; i++) {
                if (options[i].selected) {
                    if (sxca_ceb.business.getCurrentNoComposeSealsNum() >= sxca_ceb.switch.getCurrentSealSum()) {
                        sxca_ceb.ui._alert("请先保存当前签章！");
                        return;
                    }
                    if (options[i].id == "option1") {//普通盖章
                        // var signPage = document.getElementById("position_signPage").value;
                        var signX = document.getElementById("position_signX").value;
                        var signY = document.getElementById("position_signY").value;
                        var positionSignPageRangeStart = document.getElementById("position_signPageStart").value;
                        var positionSignPageRangeEnd = document.getElementById("position_signPageEnd").value;
                        // if(signPage == null || signPage == ""){
                        // 	sxca_ceb.ui._alert("请输入签章页面");
                        // 	return;
                        // }
                        if (signX == null || signX == "") {
                            sxca_ceb.ui._alert("请输入横坐标");
                            return;
                        }
                        if (isNaN(parseInt(signX)) || typeof parseInt(signX) != "number") {
                            sxca_ceb.ui._alert("横坐标请传入数字");
                            return;
                        }
                        if (signY == null || signY == "") {
                            sxca_ceb.ui._alert("请输入纵坐标");
                            return;
                        }
                        if (isNaN(parseInt(signY)) || typeof parseInt(signY) != "number") {
                            sxca_ceb.ui._alert("纵坐标请传入数字");
                            return;
                        }
                        // if(parseInt(signPage) > sxca_ceb.chapter.getCurrentPDFPageCount()){
                        // 	sxca_ceb.ui._alert("签章页码超过文档最大页码");
                        // 	return;
                        // }
                        if (!positionSignPageRangeStart) {
                            sxca_ceb.ui._alert("请输入印章范围起始页码");
                            return;
                        }
                        if (isNaN(parseInt(positionSignPageRangeStart)) || typeof parseInt(positionSignPageRangeStart) != "number") {
                            sxca_ceb.ui._alert("印章范围起始页码请传入数字");
                            return;
                        }
                        if (!positionSignPageRangeEnd) {
                            sxca_ceb.ui._alert("请输入印章范围结束页码");
                            return;
                        }
                        if (isNaN(parseInt(positionSignPageRangeEnd)) || typeof parseInt(positionSignPageRangeEnd) != "number") {
                            sxca_ceb.ui._alert("印章范围结束页码请传入数字");
                            return;
                        }
                        if (parseInt(positionSignPageRangeStart) > parseInt(positionSignPageRangeEnd)) {
                            sxca_ceb.ui._alert("印章范围起始页码不能大于结束页码");
                            return;
                        }
                        if (parseInt(positionSignPageRangeStart) <= 0) {
                            sxca_ceb.ui._alert("印章范围起始从1开始");
                            return;
                        }
                        if (parseInt(positionSignPageRangeEnd) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                            sxca_ceb.ui._alert("印章范围超过文档最大页码");
                            return;
                        }
                        if (parseInt(signX) > sxca_ceb.chapter.getCurrentPDFPageWidth()) {
                            sxca_ceb.ui._alert("横坐标超出页面范围");
                            return;
                        }
                        if (parseInt(signY) > sxca_ceb.chapter.getCurrentPDFPageHeight()) {
                            sxca_ceb.ui._alert("纵坐标超出页面范围");
                            return;
                        }
                        var allPage = document.getElementsByClassName("sxca-page-box");
                        var sealObjArr = sxca_ceb.current.getInitSeals();
                        var sealIndex = -1;

                        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
                        var currentSeal = sealsRange.children[0];
                        var currentSealId = currentSeal.getAttribute("flag");
                        for (var j = 0; j < sealObjArr.length; j++) {
                            if (sealObjArr[j].sealId == currentSealId) {
                                sealIndex = j;
                                var sealType = sxca_ceb.current.getSealType();
                                if (sealType && sealType != null && sealType != '') {
                                    if (sealType != sealObjArr[j].sealType) {
                                        sxca_ceb.ui._alert("本次签署所需印章类型与选中印章的类型不一致");
                                    }
                                }
                                break;
                            }
                        }
                        for (var j = positionSignPageRangeStart; j <= positionSignPageRangeEnd; j++) {
                            var currentItem = allPage[j - 1];

                            var seal = sxca_ceb.base.createEle("div");
                            var sealP = sxca_ceb.base.createEle("div");
                            var sealOper = sxca_ceb.base.createEle("div");

                            sealP.appendChild(seal);
                            sealP.appendChild(sealOper);

                            var point = sxca_ceb.util.getPoint(currentItem);
                            var psnd = point.split(";");
                            var item_left = parseInt(psnd[0]);
                            var item_top = parseInt(psnd[1]);
                            var w = parseInt(currentItem.offsetWidth, 10),
                                h = parseInt(currentItem.offsetHeight, 10),
                                l = parseInt(item_left, 10),
                                t = parseInt(item_top, 10);
                            var sent = {
                                l: l,
                                r: l + w,
                                t: t,
                                b: t + h,
                                n: 10
                            };
                            sxca_ceb.sealUI.showSeal(sealP, currentItem, sealObjArr, sealIndex, signX, signY, sent);
                        }
                    }
                    if (options[i].id == "option2") {//关键字盖章
                        var keyword = document.getElementById("keyword").value;
                        var radio_tag = document.getElementsByName("leftOrRight");
                        var leftOrRight;
                        var pageRangeStart = -1;
                        var pageRangeEnd = -1;
                        var verticalOffset = document.getElementById("verticalOffset").value;
                        var horizontalOffSet = document.getElementById("horizontalOffSet").value;
                        for (var j = 0; j < radio_tag.length; j++) {
                            if (radio_tag[j].checked) {
                                leftOrRight = radio_tag[j].value;
                                break;
                            }
                        }
                        radio_tag = document.getElementsByName("signetRange");
                        var signetRange;
                        for (var j = 0; j < radio_tag.length; j++) {
                            if (radio_tag[j].checked) {
                                signetRange = radio_tag[j].value;
                                break;
                            }
                        }

                        if (signetRange == "all") {
                            pageRangeStart = 1;
                            pageRangeEnd = sxca_ceb.chapter.getCurrentPDFPageCount();
                        } else if (signetRange == "notAll") {
                            pageRangeStart = document.getElementById("pageRangeStart").value;
                            pageRangeEnd = document.getElementById("pageRangeEnd").value;
                        }
                        if (!verticalOffset) {
                            sxca_ceb.ui._alert("请输入纵向偏移");
                            return;
                        }
                        if (!horizontalOffSet) {
                            sxca_ceb.ui._alert("请输入横向偏移");
                            return;
                        }
                        if (!pageRangeStart) {
                            sxca_ceb.ui._alert("请输入印章范围起始页码");
                            return;
                        }
                        if (!pageRangeEnd) {
                            sxca_ceb.ui._alert("请输入印章范围结束页码");
                            return;
                        }

                        if (keyword == null || keyword == "") {
                            sxca_ceb.ui._alert("请输入定位文字");
                            return;
                        }
                        if (parseInt(pageRangeStart) > parseInt(pageRangeEnd)) {
                            sxca_ceb.ui._alert("印章范围起始页码不能大于结束页码");
                            return;
                        }
                        if (parseInt(pageRangeStart) <= 0) {
                            sxca_ceb.ui._alert("印章范围起始从1开始");
                            return;
                        }
                        if (parseInt(pageRangeEnd) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                            sxca_ceb.ui._alert("印章范围超过文档最大页码");
                            return;
                        }
                        //去获取关键字列表
                        var fileInfo = sxca_ceb.current.getFileInfo();
                        var signCertResultObj = sxca_ceb.chapter.searchKeyWordPosition(fileInfo.fileFlag, keyword, pageRangeStart, pageRangeEnd, leftOrRight);
                        if (signCertResultObj.code == "0") {
                            if (signCertResultObj.result != null && signCertResultObj.result != "") {
                                var positions = signCertResultObj.result.split("|");
                                for (var n = 0; n < positions.length; n++) {
                                    var pos = positions[n].split(",");
                                    var signX = pos[1];
                                    var signY = pos[2];
                                    var signPage = pos[0];
                                    var allPage = document.getElementsByClassName("sxca-page-box");
                                    var currentItem = allPage[signPage - 1];
                                    var sealObjArr = sxca_ceb.current.getInitSeals();
                                    var sealIndex = -1;

                                    var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
                                    var currentSeal = sealsRange.children[0];
                                    var currentSealId = currentSeal.getAttribute("flag");
                                    for (var j = 0; j < sealObjArr.length; j++) {
                                        if (sealObjArr[j].sealId == currentSealId) {
                                            sealIndex = j;
                                            var sealType = sxca_ceb.current.getSealType();
                                            if (sealType && sealType != null && sealType != '') {
                                                if (sealType != sealObjArr[j].sealType) {
                                                    sxca_ceb.ui._alert("本次签署所需印章类型与选中印章的类型不一致");
                                                }
                                            }
                                            signY = parseInt(signY) + parseInt(verticalOffset);//即将落章的左边
                                            signX = parseInt(signX) + parseInt(horizontalOffSet);//即将落章的上边
                                            break;
                                        }
                                    }
                                    var seal = sxca_ceb.base.createEle("div");
                                    var sealP = sxca_ceb.base.createEle("div");
                                    sealP.setAttribute("leftOrRight", leftOrRight == "1" ? "left" : "right");
                                    var sealOper = sxca_ceb.base.createEle("div");

                                    sealP.appendChild(seal);
                                    sealP.appendChild(sealOper);

                                    var point = sxca_ceb.util.getPoint(currentItem);
                                    var psnd = point.split(";");
                                    var item_left = parseInt(psnd[0]);
                                    var item_top = parseInt(psnd[1]);
                                    var w = parseInt(currentItem.offsetWidth, 10),
                                        h = parseInt(currentItem.offsetHeight, 10),
                                        l = parseInt(item_left, 10),
                                        t = parseInt(item_top, 10);
                                    var sent = {
                                        l: l,
                                        r: l + w,
                                        t: t,
                                        b: t + h,
                                        n: 10
                                    };
                                    var pLeft = 0, pTop = 0;
                                    var sealWidth = Math.floor(parseInt(sealObjArr[sealIndex].sealWidth) / 10 * 39);
                                    if (signX < 0) {
                                        pLeft = 0;
                                    } else if (signX >= 0 && signX < w) {
                                        if (signX + sealWidth > w) {
                                            pLeft = w - sealWidth;
                                        } else {
                                            pLeft = signX;
                                        }
                                    } else {
                                        pLeft = w - sealWidth;
                                    }
                                    var sealHeight = Math.floor(parseInt(sealObjArr[sealIndex].sealHeight) / 10 * 39);
                                    if (signY < 0) {
                                        pTop = 0;
                                    } else if (signY >= 0 && signY < h) {
                                        if (signY + sealHeight > h) {
                                            pTop = h - sealHeight;
                                        } else {
                                            pTop = signY;
                                        }
                                    } else {
                                        pTop = h - sealHeight - 4;
                                    }
                                    sxca_ceb.sealUI.showSeal(sealP, currentItem, sealObjArr, sealIndex, pLeft, pTop, sent);
                                }
                            } else {
                                sxca_ceb.ui._alert("在签章范围内未找到关键字");
                            }

                        } else {
                            sxca_ceb.ui._alert("查询关键字坐标出错");
                        }
                    }
                    if (options[i].id == "option3") {//骑缝章
                        if (sxca_ceb.business.getCurrentNoComposeSealsNum() >= 1) {
                            sxca_ceb.ui._alert("骑缝章每次只允许加盖一个印章！");
                            return;
                        }
                        var qifeng_start_width = document.getElementById("qifeng_start_width").value;
                        var sxca_qifeng_select = document.getElementById("sxca_qifeng_select").value;
                        var pagingSignStart = parseInt(document.getElementById("pagingSignStart").value);
                        var pagingSignEnd = parseInt(document.getElementById("pagingSignEnd").value);
                        var minDiv_y = sxca_ceb.base.getId('minDiv-y');
                        var offset;
                        if (document.getElementById("minDiv-y_tr").style.display == "none") {
                            offset = sxca_ceb.switch.getOffset() / 100;
                        } else {
                            var lineDiv_y = sxca_ceb.base.getId('lineDiv-y'); //长线条
                            var minDivLeft = (minDiv_y.style.left == "" || minDiv_y.style.left == null) ? 75 : parseInt(minDiv_y.style.left);
                            offset = minDivLeft / (lineDiv_y.offsetWidth - 15);//滑块所占比例
                        }

                        if (!qifeng_start_width) {
                            sxca_ceb.ui._alert("请输入起始页宽度");
                            return;
                        }
                        if (parseInt(qifeng_start_width) > sxca_ceb.switch.getRateMax()) {
                            sxca_ceb.ui._alert("起始页宽度占比太大，不能超过：" + sxca_ceb.switch.getRateMax());
                            return;
                        }
                        if (parseInt(qifeng_start_width) < sxca_ceb.switch.getRateMin()) {
                            sxca_ceb.ui._alert("起始页宽度占比太小，不能低于：" + sxca_ceb.switch.getRateMin());
                            return;
                        }
                        if (!pagingSignStart) {
                            sxca_ceb.ui._alert("印章范围输入起始页码");
                            return;
                        }
                        if (!pagingSignEnd) {
                            sxca_ceb.ui._alert("印章范围输入结束页码");
                            return;
                        }
                        if (pagingSignEnd > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                            sxca_ceb.ui._alert("印章范围超过了文档页数");
                            return;
                        }
                        if (pagingSignStart > pagingSignEnd) {
                            sxca_ceb.ui._alert("印章范围输入顺序有误");
                            return;
                        }

                        var sealImg;
                        var sealImgWidth;
                        var sealImgHeight;

                        var sealObjArr = sxca_ceb.current.getInitSeals();
                        var sealIndex = -1;
                        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
                        var currentSeal = sealsRange.children[0];
                        var currentSealId = currentSeal.getAttribute("flag");
                        for (var j = 0; j < sealObjArr.length; j++) {
                            if (sealObjArr[j].sealId == currentSealId) {
                                sealIndex = j;
                                sealImgWidth = sealObjArr[j].width;
                                sealImgHeight = sealObjArr[j].height;
                                sealImg = sealObjArr[j].sealBase64;
                                break;
                            }
                        }
                        //往页面增加印章 需要根据
                        //根据图片、方向、比例 返回截取后的图片
                        var allPageCount = pagingSignEnd - pagingSignStart + 1;

                        for (var j = pagingSignStart; j <= pagingSignEnd; j++) {
                            sxca_ceb.util.subImg(sealImg, sealImgWidth, sealImgHeight, sxca_qifeng_select, qifeng_start_width, allPageCount, j, function (res) {
                                var seal = sxca_ceb.base.createEle("div");
                                var sealP = sxca_ceb.base.createEle("div");
                                var subBase64 = res.subBase64;
                                var subW = res.subW;
                                var subH = res.subH;
                                var k = res.j;
                                var pLeft;
                                var pTop;
                                if (sxca_qifeng_select == "left") {
                                    pLeft = 0;
                                    pTop = (sxca_ceb.chapter.getCurrentPDFPageHeight() - subH - 5) * offset; //（页面高度-章高度）*offset
                                }
                                if (sxca_qifeng_select == "right") {
                                    pLeft = sxca_ceb.chapter.getCurrentPDFPageWidth() - subW;
                                    pTop = (sxca_ceb.chapter.getCurrentPDFPageHeight() - subH - 5) * offset;
                                }
                                if (sxca_qifeng_select == "top") {
                                    pTop = 0;
                                    pLeft = (sxca_ceb.chapter.getCurrentPDFPageWidth() - subW) * offset;
                                }
                                if (sxca_qifeng_select == "bottom") {
                                    pTop = sxca_ceb.chapter.getCurrentPDFPageHeight() - subH;
                                    pLeft = (sxca_ceb.chapter.getCurrentPDFPageWidth() - subW) * offset;
                                }


                                sealP.appendChild(seal);


                                var allPage = document.getElementsByClassName("sxca-page-box");
                                var currentItem = allPage[k - 1];
                                var point = sxca_ceb.util.getPoint(currentItem);
                                var psnd = point.split(";");
                                var item_left = parseInt(psnd[0]);
                                var item_top = parseInt(psnd[1]);
                                var w = parseInt(currentItem.offsetWidth, 10),
                                    h = parseInt(currentItem.offsetHeight, 10),
                                    l = parseInt(item_left, 10),
                                    t = parseInt(item_top, 10);
                                var sent = {
                                    l: l,
                                    r: l + w,
                                    t: t,
                                    b: t + h,
                                    n: 10
                                };
                                sxca_ceb.sealUI.showQiFengSeal(sealP, currentItem, sealObjArr, sealIndex, subBase64, subW, subH, pLeft, pTop, sent);
                                // function(sealP,item,sealObjArr,sealIndex,subBase64,subW,subH,pLeft,pTop,sent,deleteButton){
                            });
                        }
                    }
                    break;
                }
            }
            // sxca_ceb.ui._popupClose();
        })
    };
    var batchSignDelSeal = function () {
        var sxca_ceb_delete = sxca_ceb.base.getId("sxca_ceb_delete");
        sxca_ceb.base.addEvent(sxca_ceb_delete, "click", function (e) {
            var noComposeSealsNum = sxca_ceb.business.getCurrentNoComposeSealsNum();
            if (noComposeSealsNum > 0) {
                sxca_ceb.util.removeAllSeal();
            }else{
                sxca_ceb.ui._alert("不存在可删除的印章")
            }
        })
    };
    var batchSignSaveSeal = function () {
        var sxca_ceb_save = sxca_ceb.base.getId("sxca_ceb_save");
        sxca_ceb.base.addEvent(sxca_ceb_save, "click", function (e) {
            var noComposeSealsNum = sxca_ceb.business.getCurrentNoComposeSealsNum();
            if (noComposeSealsNum > 0) {
                sxca_ceb_save.disabled = true;
                var procbg=sxca_ceb.ui._popupOpen("批量电子印章保存中，请耐心等待...");
                var select = sxca_ceb.base.getId("sxca_ceb_selectId");
                var options = select.getElementsByTagName("option");
                for (var i = 0; i < options.length; i++) {
                    if (options[i].selected) {
                        if (options[i].id == "option1") {//固定位置盖章
                            var sealImgs = document.getElementsByClassName("sxca_sealImg");
                            var ids = [];
                            for (var j = 0; j < sealImgs.length; j++) {//根据id中的时间进行排序
                                ids.push(sealImgs[j].id.substr(9));
                            }
                            for (var j = 0; j < ids.length; j++) {
                                for (var k = j + 1; k < ids.length; k++) {
                                    if (ids[j] > ids[k]) {
                                        var tem = ids[j];
                                        ids[j] = ids[k];
                                        ids[k] = tem;
                                    }
                                }
                            }
                            var strArr = [];
                            var sealIds = [];
                            for (var j = 0; j < ids.length; j++) {//进行循环保存
                                var sealImg = document.getElementById(sxca_ceb.constant.getValue().sealImgId + ids[j]);
                                sealIds.push(sxca_ceb.constant.getValue().sealImgId + ids[j]);
                                var sealId = sealImg.getAttribute("sealflag");
                                var signX = parseInt(sealImg.style.left);
                                var signY = parseInt(sealImg.style.top);
                                var currentPageNo = sealImg.parentNode.getAttribute("index");
                                var fileInfo = sxca_ceb.current.getFileInfo();
                                var sealObject = new sxca_ceb.trans.SealObj(sealId, signX, signY, fileInfo.fileFlag, currentPageNo);
                                sealObject.signType = "fixPosition";
                                if (j == ids.length - 1) {
                                    sealObject.isLast = 1;
                                } else {
                                    sealObject.isLast = 0;
                                }
                                var signRule = sxca_ceb.util.json_objToStr(sealObject);
                                strArr.push(signRule);
                            }
                            sxca_ceb.chapter.getFileHashAndSignCert(0,strArr.length, strArr,sealIds, procbg, function(obj){
                                if(obj && obj.code != "0"){
                                    sxca_ceb.current.setReturnCertSealsNull();
                                    var fileInfo = sxca_ceb.current.getFileInfo();
                                    sxca_ceb.business.loadFile(fileInfo.fileFlag);
                                }
                                sxca_ceb_save.disabled = false;
                            });
                        }
                        if (options[i].id == "option2") {//关键字盖章盖章
                            var sealImgs = document.getElementsByClassName("sxca_sealImg");
                            var ids = [];
                            for (var j = 0; j < sealImgs.length; j++) {//根据id中的时间进行排序
                                ids.push(sealImgs[j].id.substr(9));
                            }
                            var strArr = [];
                            var sealIds = [];
                            for (var j = 0; j < ids.length; j++) {//进行循环保存
                                var sealImg = document.getElementById(sxca_ceb.constant.getValue().sealImgId + ids[j]);
                                sealIds.push(sxca_ceb.constant.getValue().sealImgId + ids[j]);
                                var sealId = sealImg.getAttribute("sealflag");
                                var signX = parseInt(sealImg.style.left);
                                var signY = parseInt(sealImg.style.top);
                                var currentPageNo = sealImg.parentNode.getAttribute("index");
                                var fileInfo = sxca_ceb.current.getFileInfo();
                                var sealObject = new sxca_ceb.trans.SealObj(sealId, signX, signY, fileInfo.fileFlag, currentPageNo);
                                sealObject.signType = "keyWord";
                                sealObject.keyword = document.getElementById("keyword").value;
                                sealObject.leftOrRight = sealImg.getAttribute("leftOrRight");
                                if (j == ids.length - 1) {
                                    sealObject.isLast = 1;
                                } else {
                                    sealObject.isLast = 0;
                                }
                                var signRule = sxca_ceb.util.json_objToStr(sealObject);
                                strArr.push(signRule);
                            }
                            sxca_ceb.chapter.getFileHashAndSignCert(0,strArr.length, strArr,sealIds, procbg, function(obj){
                                if(obj && obj.code != "0"){
                                    sxca_ceb.current.setReturnCertSealsNull();
                                    var fileInfo = sxca_ceb.current.getFileInfo();
                                    sxca_ceb.business.loadFile(fileInfo.fileFlag);
                                }
                                sxca_ceb_save.disabled = false;
                            });
                        }
                        if (options[i].id == "option3") {//骑缝章盖章
                            var sealImgs = document.getElementsByClassName("sxca_sealImg");
                            if (sealImgs == null || sealImgs.length == 0) {
                                return;
                            }

                            var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
                            var currentSeal = sealsRange.children[0];
                            var currentSealId = currentSeal.getAttribute("flag");
                            var sxca_qifeng_select = document.getElementById("sxca_qifeng_select").value;
                            var offset = 0;
                            if (sxca_qifeng_select == "left" || sxca_qifeng_select == "right") {
                                offset = parseInt(sealImgs[0].style.top);
                            }
                            if (sxca_qifeng_select == "top" || sxca_qifeng_select == "bottom") {
                                offset = parseInt(sealImgs[0].style.left);
                            }

                            var pagingSignObj = {};
                            pagingSignObj.sealId = currentSealId;
                            pagingSignObj.firstPageRate = document.getElementById("qifeng_start_width").value;
                            pagingSignObj.fileFlag = sxca_ceb.current.getFileInfo().fileFlag;
                            pagingSignObj.direction = sxca_qifeng_select == "top" ? "up" : sxca_qifeng_select;
                            pagingSignObj.offset = offset;
                            pagingSignObj.x = parseInt(sealImgs[0].style.left);
                            pagingSignObj.y = parseInt(sealImgs[0].style.top);
                            var pageRange = new Array();
                            pageRange[0] = new Array();
                            pageRange[0][0] = parseInt(document.getElementById("pagingSignStart").value);
                            pageRange[0][1] = parseInt(document.getElementById("pagingSignEnd").value);
                            pagingSignObj.pageRange = pageRange;
                            var pagingSignStr = sxca_ceb.util.json_objToStr(pagingSignObj);
                            sxca_ceb.chapter.getPagingSignFileHashAndSignCert(pagingSignStr)
                        }
                    }
                }
            }else{
                sxca_ceb.ui._alert("不存在待保存的印章")
            }
        })
    };

    var initFixedBatchParam = function (position_signPageStart, position_signPageEnd, position_signX, position_signY) {
        //固定位置盖章
        // if (position_signPage) {
        // 	if (typeof parseInt(position_signPage) != "number") {
        // 		sxca_ceb.ui._alert("position_signPage：请传入数字");
        // 		return;
        // 	}
        // 	if (parseInt(position_signPage) < 0 || parseInt(position_signPage) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
        // 		sxca_ceb.ui._alert("position_signPage：超出文档页码范围");
        // 		return;
        // 	}
        // 	document.getElementById("position_signPage").value = parseInt(position_signPage);
        // 	document.getElementById("position_signPage_tr").style.display = "none";
        // }
        if (position_signPageStart) {
            if (isNaN(parseInt(position_signPageStart)) || typeof parseInt(position_signPageStart) != "number") {
                sxca_ceb.ui._alert("position_signPageStart：请传入数字");
                return;
            }
            if (parseInt(position_signPageStart) < 0 || parseInt(position_signPageStart) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("position_signPageStart：超出文档页码范围");
                return;
            }
            document.getElementById("position_signPageStart").value = parseInt(position_signPageStart);
            document.getElementById("position_signPage_tr").style.display = "none";
        }
        if (position_signPageEnd) {
            if (isNaN(parseInt(position_signPageEnd)) || typeof parseInt(position_signPageEnd) != "number") {
                sxca_ceb.ui._alert("position_signPageEnd：请传入数字");
                return;
            }
            if (parseInt(position_signPageEnd) < 0 || parseInt(position_signPageEnd) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("position_signPageEnd：超出文档页码范围");
                return;
            }
            if (parseInt(position_signPageStart) > parseInt(position_signPageEnd)) {
                sxca_ceb.ui._alert("position_signPageEnd：开始页码不能大于结束页码");
                return;
            }
            document.getElementById("position_signPageEnd").value = parseInt(position_signPageEnd);
            document.getElementById("position_signPage_tr").style.display = "none";
        } else {
            sxca_ceb.ui._alert("position_signPageEnd：结束页码不能为空，如需只签署一页，请与开始页码相同");
            return;
        }
        if (position_signX) {
            if (isNaN(parseInt(position_signX)) || typeof parseInt(position_signX) != "number") {
                sxca_ceb.ui._alert("position_signX：请传入数字");
                return;
            }
            if (parseInt(position_signX) < 0 || parseInt(position_signX) > sxca_ceb.chapter.getCurrentPDFPageWidth()) {
                sxca_ceb.ui._alert("position_signX：坐标位置超过文档宽度");
                return;
            }
            document.getElementById("position_signX").value = parseInt(position_signX);
            document.getElementById("position_signX_tr").style.display = "none";
        }
        if (position_signY) {
            if (isNaN(parseInt(position_signY)) || typeof parseInt(position_signY) != "number") {
                sxca_ceb.ui._alert("position_signY：请传入数字");
                return;
            }
            if (parseInt(position_signY) < 0 || parseInt(position_signY) > sxca_ceb.chapter.getCurrentPDFPageHeight()) {
                sxca_ceb.ui._alert("position_signY：坐标位置超过文档高度");
                return;
            }
            document.getElementById("position_signY").value = parseInt(position_signY);
            document.getElementById("position_signY_tr").style.display = "none";
        }
    };
    var initKeywordBatchParam = function (keyword, leftOrRight, verticalOffset, horizontalOffSet, signetRange, pageRangeStart, pageRangeEnd) {
        if (keyword) {
            document.getElementById("keyword").value = decodeURI(keyword);
            document.getElementById("keyword_tr").style.display = "none";
        }
        // 1左  2右
        if (leftOrRight && (leftOrRight == 1 || leftOrRight == 2)) {
            var radio_tag = document.getElementsByName("leftOrRight");
            for (var i = 0; i < radio_tag.length; i++) {
                if (radio_tag[i].value == leftOrRight) {
                    radio_tag[i].checked = true;
                    document.getElementById("leftOrRight_tr").style.display = "none";
                    break;
                }
            }
        }
        if (verticalOffset || verticalOffset == 0) {
            if (typeof parseInt(verticalOffset) != "number") {
                sxca_ceb.ui._alert("verticalOffset：请传入数字");
                return;
            }
            document.getElementById("verticalOffset").value = parseInt(verticalOffset);
            document.getElementById("verticalOffset_tr").style.display = "none";
        }
        if (horizontalOffSet || horizontalOffSet == 0) {
            if (typeof parseInt(horizontalOffSet) != "number") {
                sxca_ceb.ui._alert("horizontalOffSet：请传入数字");
                return;
            }
            document.getElementById("horizontalOffSet").value = parseInt(horizontalOffSet);
            document.getElementById("horizontalOffset_tr").style.display = "none";
        }
        //all  notAll 如果notAll则 pageRangeStart pageRangeEnd则需要必须传入
        if (signetRange && (signetRange == "all" || signetRange == "notAll")) {
            var radio_tag = document.getElementsByName("signetRange");
            for (var i = 0; i < radio_tag.length; i++) {
                if (radio_tag[i].value == signetRange) {
                    radio_tag[i].checked = true;
                    document.getElementById("signetRange_tr").style.display = "none";
                    break;
                    //如果传入的是notAll 按理说得在这里对pageRangeStart pageRangeEnd赋值
                    // 但是在下边赋值也没错，所以不再进行嵌套，pageRangeStart、pageRangeEnd直接取1和最大值，即使填值了也没事
                }
            }
        }
        if (pageRangeStart) {
            if (typeof parseInt(pageRangeStart) != "number") {
                sxca_ceb.ui._alert("pageRangeStart：请传入数字");
                return;
            }
            if (parseInt(pageRangeStart) < 1 || parseInt(pageRangeStart) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("pageRangeStart：超出文档页码范围");
                return;
            }
            document.getElementById("pageRangeStart").value = parseInt(pageRangeStart);
        }
        if (pageRangeEnd) {
            if (typeof parseInt(pageRangeEnd) != "number") {
                sxca_ceb.ui._alert("pageRangeEnd：请传入数字");
                return;
            }
            if (parseInt(pageRangeEnd) < 0 || parseInt(pageRangeEnd) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("pageRangeEnd：超出文档页码范围");
                return;
            }
            if (parseInt(pageRangeStart) > parseInt(pageRangeEnd)) {
                sxca_ceb.ui._alert("pageRangeEnd：开始页码不能大于结束页码");
                return;
            }
            document.getElementById("pageRangeEnd").value = parseInt(pageRangeEnd);
        }
    };
    var initPagingBatchParam = function (firstPageRate, direction, offset, pagingSignStart, pagingSignEnd) {
        //骑缝章
        if (firstPageRate) {
            if (typeof parseInt(firstPageRate) != "number") {
                sxca_ceb.ui._alert("firstPageRate：请传入数字");
                return;
            }
            if (parseInt(firstPageRate) < 0 || parseInt(firstPageRate) > 100) {
                sxca_ceb.ui._alert("firstPageRate：起始页骑缝章占比太大");
                return;
            }

            document.getElementById("qifeng_start_width").value = parseInt(firstPageRate);
            document.getElementById("qifeng_start_width_tr").style.display = "none";
        }
        if (direction) {
            if (direction == "top" || direction == "bottom" || direction == "left" || direction == "right") {
                sxca_ceb.base.getId("sxca_qifeng_select").value = direction;
                document.getElementById("sxca_qifeng_select_tr").style.display = "none";
            } else {
                sxca_ceb.ui._alert("印章位置初始化错误：请传入top、 bottom、left、right中的一个");
                return;
            }
        }
        //是百分比  不是像素值
        if (offset) {
            if (typeof parseInt(offset) != "number") {
                sxca_ceb.ui._alert("offset：请传入数字");
                return;
            }
            if (parseInt(offset) < 0 || parseInt(offset) > 100) {
                sxca_ceb.ui._alert("offset：请传入0-100之内的值");
                return;
            }
            sxca_ceb.switch.setOffset(offset);
            document.getElementById("minDiv-y_tr").style.display = "none";

        }
        if (pagingSignStart && pagingSignEnd) {
            if (typeof parseInt(pagingSignStart) != "number") {
                sxca_ceb.ui._alert("pagingSignStart：请传入数字");
                return;
            }
            if (parseInt(pagingSignStart) < 0 || parseInt(pagingSignStart) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("pagingSignStart：超出文档页码范围");
                return;
            }

            if (typeof parseInt(pagingSignEnd) != "number") {
                sxca_ceb.ui._alert("pagingSignEnd：请传入数字");
                return;
            }
            if (parseInt(pagingSignEnd) < 0 || parseInt(pagingSignEnd) > sxca_ceb.chapter.getCurrentPDFPageCount()) {
                sxca_ceb.ui._alert("pagingSignEnd：超出文档页码范围");
                return;
            }

            if (parseInt(pagingSignStart) > parseInt(pagingSignEnd)) {
                sxca_ceb.ui._alert("印章范围输入顺序有误");
                return;
            }
            document.getElementById("pagingSignStart").value = pagingSignStart;
            document.getElementById("pagingSignEnd").value = pagingSignEnd;
            document.getElementById("pagingSign_tr").style.display = "none";
        }
    };
    return {
        initFixedBatchParam: initFixedBatchParam,
        initKeywordBatchParam: initKeywordBatchParam,
        initPagingBatchParam: initPagingBatchParam,
        showSeal: showSeal,
        showQiFengSeal: showQiFengSeal,
        getRegion: getRegion,
        judgeSameSeal: judgeSameSeal,
        slideSeal: slideSeal,
        selectSealMode: selectSealMode,
        proofreadPanelLeft: proofreadPanelLeft,
        switchSeals: switchSeals,
        pageRefresh: pageRefresh,
        pagingSignPageRefresh: pagingSignPageRefresh,
        pagescroll: pagescroll,
        selectSealType: selectSealType,
        fileOpen: fileOpen,
        pagingSignDirectionChange: pagingSignDirectionChange,
        setInitImg: setInitImg,
        searchTxtControl: searchTxtControl,
        loadComposeSealEvent: loadComposeSealEvent,
        batchSignAddSeal: batchSignAddSeal,
        batchSignSaveSeal: batchSignSaveSeal,
        batchSignDelSeal: batchSignDelSeal,
        signleSignSureSeal: signleSignSureSeal,
        printmeFileControl: printmeFileControl,
        overlapDragHandle: overlapDragHandle,
    };
}());
/*****************************************************************
 该模块主要完成在不同浏览器下签名验签的业务操作，最终实现签章业务达成
 *****************************************************************/
jit_ceb.business = (function () {
    var jitBusObj = function (flag, errCode, msg, data) {
        this.flag = flag;//自定义的业务标识
        this.errCode = errCode;//错误码
        this.msg = msg; //消息描述
        this.data = data;      //结果数据
    };
    var getVersion = function (){
        var message = "";
        if (sxca_ceb.util.getBrowser() == "IE") {
            message = JITComVCTKEx.JITGetVersion();
        } else {
            message = JITHTTPCLIENT.GetVersion();
        }
        console.log("VCTK版本-------"+message);
        return message;
    };
    var initParams = function (){
        var message = "";
        var initParam = sxca_ceb.constant.getValue().ukeyInitParam;
        if (sxca_ceb.util.getBrowser() == "IE") {
            JITComVCTKEx.Initialize(initParam);
            if (JITComVCTKEx.GetErrorCode() != 0) {
                message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
                sxca_ceb.journal.logDebug("IE浏览器VCTK初始化失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
                return new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, "");
            }
        } else {
            var ret = JITHTTPCLIENT.RegisterParam(initParam);
            if (ret != 0) {
                if (ret == 100) {
                    sxca_ceb.journal.logDebug("主流浏览器VCTK初始化参数失败，错误信息：数据格式错误");
                    return new jitBusObj(1, "", " 错误信息：数据格式错误", "");
                } else if (ret == 500) {
                    sxca_ceb.journal.logDebug("主流浏览器VCTK初始化参数失败，错误信息：业务处理中");
                    return new jitBusObj(1, "", " 错误信息：业务处理中", "");
                } else {
                    ret = JITHTTPCLIENT.GetErrorCode();
                    if (ret != 0) {
                        message = JITHTTPCLIENT.GetErrorMessage(ret);
                        sxca_ceb.journal.logDebug("主流浏览器VCTK初始化参数失败，错误码：" + ret + "，错误信息：" + message);
                        return new jitBusObj(1, ret, " 错误信息：" + message, "");
                    }
                }
                sxca_ceb.journal.logDebug("主流浏览器VCTK初始化参数失败，错误码：" + ret + "，错误信息：初始化参数失败");
                return new jitBusObj(1, ret, " 错误信息：初始化参数失败", "");
            }
        }
        return new jitBusObj(0, 0, "VCTK控件初始化参数成功", "");
    };


    var finalize = function (){
        var message = "";
        if (sxca_ceb.util.getBrowser() == "IE") {
            JITComVCTKEx.Finalize();
        } else {
            JITHTTPCLIENT.Finalize();
        }
    };
    //IE浏览器签名
    var attachSignIE = function (orgstr, fn) {
        var message = "";
        if (orgstr) {
            JITComVCTKEx.SetCertChooseType(1);
            if (JITComVCTKEx.GetErrorCode() != 0) {
                message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
                sxca_ceb.journal.logDebug("IE浏览器VCTK证书类型选择失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
                fn && fn(new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, ""));
                return;
            }
            var currentCert = sxca_ceb.current.getCertInfo();
            // JITComVCTKEx.SetCert("SC", currentCert.strDN, "", "", currentCert.strDNIssuer, "");
            // if (JITComVCTKEx.GetErrorCode() != 0) {
            //     message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
            //     sxca_ceb.journal.logDebug("IE浏览器VCTK证书过滤失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
            //     fn && fn(new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, ""));
            //     JITComVCTKEx.Finalize();
            //     return;
            // }

            message = JITComVCTKEx.AttachSignStr(currentCert.strDN, orgstr);
            if (JITComVCTKEx.GetErrorCode() != 0) {
                message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
                sxca_ceb.journal.logDebug("IE浏览器VCTK数字签名失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
                fn && fn(new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, ""));
                return;
            }
            if (message) {
                fn && fn(new jitBusObj(0, "", "IE浏览器VCTK签名成功", message));
            }
            sxca_ceb.journal.logDebug("IE浏览器VCTK数字签名成功，签名结果：" + message);
            return;
        } else {
            sxca_ceb.journal.logDebug("IE浏览器VCTK数字签名失败，错误信息：待签名信息为空");
            fn && fn(new jitBusObj(1, "", " 错误信息：待签名信息不能为空", ""));
            return;
        }
    };
    //主流浏览器签名
    var attachSignChrome = function (orgstr, fn) {
        var ret = -1;
        var message = "";
        if (orgstr) {
            ret = JITHTTPCLIENT.SetCertChooseType(1);
            if (ret != 0) {
                ret = JITHTTPCLIENT.GetErrorCode();
                if (ret != 0) {
                    message = JITHTTPCLIENT.GetErrorMessage(ret);
                    sxca_ceb.journal.logDebug("主流浏览器VCTK设置证书选择类型失败，错误码：" + ret + "，错误信息：" + message);
                    fn && fn(new jitBusObj(1, ret, " 错误信息：" + message, ""));
                    return;
                }
                sxca_ceb.journal.logDebug("主流浏览器VCTK设置证书选择类型失败，错误码：" + ret + "，错误信息：设置证书选择类型失败");
                fn && fn(new jitBusObj(1, ret, " 错误信息：设置证书选择类型失败", ""));
                return;
            }

            var currentCert = sxca_ceb.current.getCertInfo();

            // ret = JITHTTPCLIENT.SetCert("SC", currentCert.strDN, "", "", currentCert.strDNIssuer, "");
            // if (ret != 0) {
            //     ret = JITHTTPCLIENT.GetErrorCode();
            //     if (ret != 0) {
            //         message = JITHTTPCLIENT.GetErrorMessage(ret);
            //         sxca_ceb.journal.logDebug("主流浏览器VCTK设置证书过滤失败，错误码：" + ret + "，错误信息：" + message);
            //         fn && fn(new jitBusObj(1, ret, " 错误信息：" + message, ""));
            //         return;
            //     }
            //     sxca_ceb.journal.logDebug("主流浏览器VCTK设置证书过滤失败，错误码：" + ret + "，错误信息：设置证书过滤失败");
            //     fn && fn(new jitBusObj(1, ret, " 错误信息：设置证书过滤失败", ""));
            //     return;
            // }

            message = JITHTTPCLIENT.AttachSignStr(currentCert.strDN, orgstr);
            ret = JITHTTPCLIENT.GetErrorCode();
            if (ret != 0) {
                message = JITHTTPCLIENT.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("主流浏览器VCTK数字签名失败，错误码：" + ret + "，错误信息：" + message);
                fn && fn(new jitBusObj(1, ret, " 错误信息：" + message, ""));
                return;
            } else {
                fn && fn(new jitBusObj(0, "", "主流浏览器VCTK签名成功", message));
            }
            sxca_ceb.journal.logDebug("主流浏览器VCTK签名成功");
            return;
        } else {
            sxca_ceb.journal.logDebug("主流浏览器VCTK签名失败失败，错误信息：待签名信息不能为空");
            fn && fn(new jitBusObj(1, "", " 错误信息：待签名信息不能为空", ""));
            return;
        }
    };
    //签名
    var attachSign = function (orgstr, fn) {
        var currentCert = sxca_ceb.current.getCertInfo();
        var certCubject = currentCert.strDN;
        if (sxca_ceb.util.getBrowser() == "IE") {
            attachSignIE(orgstr, function (msgObj) {
                if (msgObj) {
                    if (msgObj.flag != 0) {
                        sxca_ceb.current.setCertNull();
                        if (msgObj.errCode == sxca_ceb.constant.getValue().nocert) {
                            sxca_ceb.ui._alert("P7签名时，未找到证书：" + certCubject);
                        }
                    }
                    fn && fn(msgObj);
                } else {
                    sxca_ceb.current.setCertNull();
                    return;
                }
            });
        } else {
            attachSignChrome(orgstr, function (msgObj) {
                if (msgObj) {
                    if (msgObj.flag != 0) {
                        sxca_ceb.current.setCertNull();
                        if (msgObj.errCode == sxca_ceb.constant.getValue().nocert) {
                            sxca_ceb.ui._alert("P7签名时，未找到证书：" + certCubject);
                        }
                    }
                    fn && fn(msgObj);
                } else {
                    sxca_ceb.current.setCertNull();
                    return;
                }
            });
        }
    };
    var P1SignBase64StrIE = function (strSrc, fn) {
        var message = "";
        if (strSrc) {
            JITComVCTKEx.SetCertChooseType(1);
            if (JITComVCTKEx.GetErrorCode() != 0) {
                message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
                sxca_ceb.journal.logDebug("IE浏览器VCTK进行P1SignBase64Str证书类型选择失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
                fn && fn(new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, ""));
                return;
            }
            var currentCert = sxca_ceb.current.getCertInfo();
            // JITComVCTKEx.SetCert("SC", currentCert.strDN, "", "", currentCert.strDNIssuer, "");
            // if (JITComVCTKEx.GetErrorCode() != 0) {
            //     message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
            //     sxca_ceb.journal.logDebug("IE浏览器VCTK进行P1SignBase64Str证书过滤失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
            //     fn && fn(new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, ""));
            //     JITComVCTKEx.Finalize();
            //     return;
            // }
            message = JITComVCTKEx.P1SignOtherStr(currentCert.strDN, strSrc, 1);
            if (JITComVCTKEx.GetErrorCode() != 0) {
                message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
                sxca_ceb.journal.logDebug("IE浏览器VCTK数字P1SignBase64Str签名失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
                fn && fn(new jitBusObj(1, JITComVCTKEx.GetErrorCode(), " 错误信息：" + message, ""));
                return;
            }
            if (message) {
                fn && fn(new jitBusObj(0, "", "IE浏览器VCTK数字P1SignBase64Str签名成功", message));
            }
            sxca_ceb.journal.logDebug("IE浏览器VCTK数字P1SignBase64Str签名成功，签名结果：" + message);
            return;
        } else {
            sxca_ceb.journal.logDebug("IE浏览器VCTK数字P1SignBase64Str签名失败，错误信息：待签名信息为空");
            fn && fn(new jitBusObj(1, "", " 错误信息：待签名信息不能为空", ""));
            return;
        }

    };
    var P1SignBase64StrChrome = function (strSrc, fn) {
        var ret = -1;
        var message = "";
        if (strSrc) {
            ret = JITHTTPCLIENT.SetCertChooseType(1);
            if (ret != 0) {
                ret = JITHTTPCLIENT.GetErrorCode();
                if (ret != 0) {
                    message = JITHTTPCLIENT.GetErrorMessage(ret);
                    sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str设置证书选择类型失败，错误码：" + ret + "，错误信息：" + message);
                    fn && fn(new jitBusObj(1, ret, " 错误信息：" + message, ""));
                    return;
                }
                sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str设置证书选择类型失败，错误码：" + ret + "，错误信息：设置证书选择类型失败");
                fn && fn(new jitBusObj(1, ret, " 错误信息：设置证书选择类型失败", ""));
                return;
            }

            var currentCert = sxca_ceb.current.getCertInfo();

            // ret = JITHTTPCLIENT.SetCert("SC", currentCert.strDN, "", "", currentCert.strDNIssuer, "");
            // if (ret != 0) {
            //     ret = JITHTTPCLIENT.GetErrorCode();
            //     if (ret != 0) {
            //         message = JITHTTPCLIENT.GetErrorMessage(ret);
            //         sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str设置证书过滤失败，错误码：" + ret + "，错误信息：" + message);
            //         fn && fn(new jitBusObj(1, ret, " 错误信息：" + message, ""));
            //         return;
            //     }
            //     sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str设置证书过滤失败，错误码：" + ret + "，错误信息：设置证书过滤失败");
            //     fn && fn(new jitBusObj(1, ret, " 错误信息：设置证书过滤失败", ""));
            //     return;
            // }
            message = JITHTTPCLIENT.P1SignBase64Str(currentCert.strDN, strSrc, 1);
            ret = JITHTTPCLIENT.GetErrorCode();

            if (ret != 0) {
                message = JITHTTPCLIENT.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str数字签名失败，错误码：" + ret + "，错误信息：" + message);
                fn && fn(new jitBusObj(1, ret, " 错误信息：" + message, ""));
                return;
            } else {
                fn && fn(new jitBusObj(0, "", "主流浏览器VCTK进行P1SignBase64Str签名成功", message));
            }
            sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str签名成功");
            return;
        } else {
            sxca_ceb.journal.logDebug("主流浏览器VCTK进行P1SignBase64Str签名失败失败，错误信息：待签名信息不能为空");
        }
    };
    var P1SignBase64Str = function (strSrcData, fn) {
        var currentCert = sxca_ceb.current.getCertInfo();
        var certCubject = currentCert.strDN;
        if (sxca_ceb.util.getBrowser() == "IE") {
            P1SignBase64StrIE(strSrcData, function (msgObj) {
                if (msgObj) {
                    if (msgObj.flag != 0) {
                        sxca_ceb.current.setCertNull();
                        if (msgObj.errCode == sxca_ceb.constant.getValue().nocert) {
                            sxca_ceb.ui._alert("P1签名时，未找到证书：" + certCubject);
                        }
                    }
                    fn && fn(msgObj);
                } else {
                    sxca_ceb.current.setCertNull();
                    return;
                }
            });
        } else {
            P1SignBase64StrChrome(strSrcData, function (msgObj) {
                if (msgObj) {
                    if (msgObj.flag != 0) {
                        sxca_ceb.current.setCertNull();
                        if (msgObj.errCode == sxca_ceb.constant.getValue().nocert) {
                            sxca_ceb.ui._alert("P1签名时，未找到证书：" + certCubject);
                        }
                    }
                    fn && fn(msgObj);
                } else {
                    sxca_ceb.current.setCertNull();
                    return;
                }
            });
        }
    };
    var getCertInfoListIE = function () {
        var ret = -1;
        var message = "";
        var certInfoArr = [];
        var strCertLists = "";
        var isSupportGetExpireCert = "0";
        try{
            // strCertLists = JITHTTPCLIENT.GetCertLists1("SC", "", "","","CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN",-1);
            strCertLists = JITComVCTKEx.GetCertLists1("SC", "", "","","CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN",-1);
            if (strCertLists.indexOf("C=CN") == -1) {
                ret = JITComVCTKEx.GetErrorCode();
                if (ret != 0) {
                    message = JITComVCTKEx.GetErrorMessage(ret);
                    sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书列表失败，错误码：" + ret + "，错误信息：" + message);
                    return;
                }else if(strCertLists.indexOf("函数不支持") != -1){
                    message = "函数不支持";
                    sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书列表失败，错误码：-1，错误信息：函数不支持");
                }
            }else{
                isSupportGetExpireCert = "1";
            }
        }catch(e){
            console.log("需要12.3以上版本的vctk支持");
        }
        JITComVCTKEx.SetCertChooseType(1);
        if(strCertLists.indexOf("C=CN") == -1){
            // strCertLists = JITHTTPCLIENT.GetCertLists("SC", "", "","","CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN",-1);
            var strCertLists = JITComVCTKEx.GetCertLists("SC", "", "", "", "CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN", -1);
            if (strCertLists.indexOf("C=CN") == -1) {
                ret = JITComVCTKEx.GetErrorCode();
                if (ret != 0) {
                    message = JITComVCTKEx.GetErrorMessage(ret);
                    sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书列表失败，错误码：" + ret + "，错误信息：" + message);
                    return;
                }
            }
        }
        var jsonObj = eval('(' + strCertLists + ')');
        for (var i = 0; i < jsonObj.length; i++) {
            var cert = jsonObj[i];
            var dn = cert.dn;
            if(isSupportGetExpireCert == "1"){
                ret = JITComVCTKEx.SetCert4("SC", dn, "", "", "", "");
            }else{
                ret = JITComVCTKEx.SetCert("SC", dn, "", "", "", "");
            }
            if (ret != 0) {
                message = JITComVCTKEx.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书列表失败，错误码：" + ret + "，错误信息：" + message);
                console.log("获取证书时出现异常" + ret + ":" + message);
                return;
            }
            var notBefore = JITComVCTKEx.GetCertInfo("SC", 5, "");
            var notAfter = JITComVCTKEx.GetCertInfo("SC", 6, "");
            cert.notBefore = notBefore;
            cert.notAfter = notAfter;
            certInfoArr.push(cert)
        }
        return certInfoArr;
    };
    var getCertInfoListChrome = function () {
        var ret = -1;
        var message = "";
        var certInfoArr = [];
        var strCertLists = "";
        //是否支持获取过期证书，通过12.3以上版本的vctk调用GetCertLists1方法进行获取，如果失败则标识不支持
        //如果支持，使用setcert4获取过期时间，否则使用setcert获取失效时间
        var isSupportGetExpireCert = "0";
        try{
            // strCertLists = JITHTTPCLIENT.GetCertLists1("SC", "", "","","CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN",-1);
            strCertLists = JITHTTPCLIENT.GetCertLists1("SC", "", "","","CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN",-1);
            if (strCertLists.indexOf("C=CN") == -1) {
                ret = JITHTTPCLIENT.GetErrorCode();
                if (ret != 0) {
                    message = JITHTTPCLIENT.GetErrorMessage(ret);
                    sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书列表失败，错误码：" + ret + "，错误信息：" + message);
                    return;
                }else if(strCertLists.indexOf("函数不支持") != -1){
                    message = "函数不支持";
                    sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书列表失败，错误码：-1，错误信息：函数不支持");
                }
            }else{
                isSupportGetExpireCert = "1";
            }
        }catch(e){
            console.log(e)
            console.log("需要12.3以上版本的vctk支持");
        }
        JITHTTPCLIENT.SetCertChooseType(1);
        if(strCertLists.indexOf("C=CN") == -1){
            // strCertLists = JITHTTPCLIENT.GetCertLists("SC", "", "","","CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN",-1);
            var strCertLists = JITHTTPCLIENT.GetCertLists("SC", "", "", "", "CN=ShanXi Digital Certificate Authority, OU=RSA, O=ShanXi Digital Certificate Authority, L=TaiYuan, S=ShanXi, C=CN", -1);
            if (strCertLists.indexOf("C=CN") == -1) {
                ret = JITHTTPCLIENT.GetErrorCode();
                if (ret != 0) {
                    message = JITHTTPCLIENT.GetErrorMessage(ret);
                    sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书列表失败，错误码：" + ret + "，错误信息：" + message);
                    return;
                }
            }
        }
        var jsonObj = eval('(' + strCertLists + ')');
        for (var i = 0; i < jsonObj.length; i++) {
            console.log(jsonObj[i])
            var cert = jsonObj[i];
            var dn = cert.dn;
            if(isSupportGetExpireCert == "1"){
                ret = JITHTTPCLIENT.SetCert4("SC", dn, "", "", "", "");
            }else{
                ret = JITHTTPCLIENT.SetCert("SC", dn, "", "", "", "");
            }
            if (ret != 0) {
                message = JITHTTPCLIENT.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书列表失败，错误码：" + ret + "，错误信息：" + message);
                console.log("获取证书时出现异常" + ret + ":" + message);
                return;
            }
            var notBefore = JITHTTPCLIENT.GetCertInfo("SC", 5, "");
            var notAfter = JITHTTPCLIENT.GetCertInfo("SC", 6, "");
            cert.notBefore = notBefore;
            cert.notAfter = notAfter;

            certInfoArr.push(cert)
        }
        return certInfoArr;
    };
    var getCertInfoList = function () {
        finalize();
        initParams();
        var certInfoArr;
        var certSubjectStr = "";
        sxca_ceb.current.setInitCertsNull();
        sxca_ceb.current.setCertSubjectStr("");
        if (sxca_ceb.util.getBrowser() == "IE") {
            certInfoArr = getCertInfoListIE();
        } else {
            certInfoArr = getCertInfoListChrome();
        }
        if(certInfoArr && certInfoArr.length >0){
            for (var i = 0; i < certInfoArr.length; i++) {
                var cert = certInfoArr[i];
                var dn = cert.dn;
                var notAfter = cert.notAfter;
                console.log("【" + cert.certtype + "证书" + "】" + "-" + "【" + cert.sn + "】" + dn + "-------" + cert.type+ "-------" + notAfter)
                var time = parseInt((new Date(notAfter).getTime() - new Date().getTime())/(24*3600*1000));
                if(time > 0){
                    certSubjectStr += dn + "#";
                }
                if(time < 31){
                    var style = "";
                    if(time <= 0){
                        style = "style='background:red;'";
                    }
                    var certCN = dn.substring(dn.indexOf('CN=') + 3, dn.indexOf(','));
                    notAfter = notAfter.substring(0,notAfter.indexOf(" "));
                    var certExpires = sxca_ceb.base.getId("cert-expires");
                    var certExpiresDiv = sxca_ceb.base.getId("cert-expires-div");
                    if(certExpiresDiv){
                        certExpiresDiv.style.display = "block";
                        if (certExpires) {
                            var tip = "<span>" + certCN + "</span><br>" +
                                "过期时间：<span class='sxca-signet-form-panel-con-time' "+style+">"+notAfter+"</span><br>"
                            var certExpiresPer = sxca_ceb.base.createEle("div");
                            certExpiresPer.className = "sxca-signet-form-panel-con-per";
                            certExpiresPer.innerHTML = tip;
                            certExpires.appendChild(certExpiresPer);
                        }
                    }
                }
            }
            if (certSubjectStr != "" && certSubjectStr.length > 0) {
                certSubjectStr = certSubjectStr.substring(0, certSubjectStr.length - 1)
            }
            sxca_ceb.current.setCertSubjectStr(certSubjectStr);
        }
        return certSubjectStr;
    };
    var getCertInfoIE = function (chooseType,certSubject) {
        var ret = -1;
        var message = "";
        if (chooseType == undefined || chooseType == null || chooseType == "") {
            JITComVCTKEx.SetCertChooseType(1);
        } else {
            JITComVCTKEx.SetCertChooseType(chooseType);
        }
        ret = JITComVCTKEx.GetErrorCode();
        if (ret != 0) {
            message = JITComVCTKEx.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取验签结果，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }

        JITComVCTKEx.SetCert("SC", certSubject, "", "", "", "");
        ret = JITComVCTKEx.GetErrorCode();
        if (ret != 0) {
            message = JITComVCTKEx.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("IE浏览器VCTK设置证书过滤失败，错误码：" + ret + "，错误信息：" + message);
            console.log("获取证书时出现异常" + ret + ":" + message);
            return ret;
        }
        message = JITComVCTKEx.P1SignOtherStr(certSubject, "获取证书进行签名，缓存PIN码", 1);
        ret = JITComVCTKEx.GetErrorCode();
        if (ret != 0) {
            message = JITComVCTKEx.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书信息失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        message = JITComVCTKEx.GetCertInfo("SC", 0, "");
        ret = JITComVCTKEx.GetErrorCode();
        if (ret != 0) {
            message = JITComVCTKEx.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书主题失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        var strDN = message;
        message = JITComVCTKEx.GetCertInfo("SC", 1, "");
        ret = JITComVCTKEx.GetErrorCode();
        if (ret != 0) {
            message = JITComVCTKEx.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书颁发者主题失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        var strDNIssuer = message;
        message = JITComVCTKEx.GetCertInfo("SC", 8, "");
        ret = JITComVCTKEx.GetErrorCode();
        if (ret != 0) {
            message = JITComVCTKEx.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取证书公钥证书信息失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        var pubkeyCert = message;
        sxca_ceb.current.setCertInfo(strDN, strDNIssuer, pubkeyCert);
        var cert={};
        cert.strDN = strDN;
        cert.strDNIssuer = strDNIssuer;
        cert.pubkeyCert = pubkeyCert;
        sxca_ceb.current.pushInitCerts(cert);
        return sxca_ceb.current.getCertInfo();
    };
    var getCertInfoChrome = function (chooseType,certSubject) {
        var ret = -1;
        var message = "";
        if (chooseType == undefined || chooseType == null || chooseType == "") {
            ret = JITHTTPCLIENT.SetCertChooseType(1);
        } else {
            ret = JITHTTPCLIENT.SetCertChooseType(chooseType);
        }
        if (ret != 0) {
            ret = JITHTTPCLIENT.GetErrorCode();
            if (ret != 0) {
                message = JITHTTPCLIENT.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("主流浏览器VCTK设置证书选择类型失败，错误码：" + ret + "，错误信息：" + message);
            }
            return ret;
        }
        ret = JITHTTPCLIENT.SetCert("SC", certSubject, "", "", "", "");
        if (ret != 0) {
            ret = JITHTTPCLIENT.GetErrorCode();
            if (ret != 0) {
                message = JITHTTPCLIENT.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("主流浏览器VCTK设置证书过滤失败，错误码：" + ret + "，错误信息：" + message);
                console.log("获取证书时出现异常" + ret + ":" + message);
            }
            return ret;
        }
        message = JITHTTPCLIENT.P1SignBase64Str(certSubject, "获取证书进行签名，缓存PIN码", 1);
        ret = JITHTTPCLIENT.GetErrorCode();
        if (ret != 0) {
            message = JITHTTPCLIENT.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书信息失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }

        var strDN = JITHTTPCLIENT.GetCertInfo("SC", 0, "");
        ret = JITHTTPCLIENT.GetErrorCode();
        if (ret != 0) {
            message = JITHTTPCLIENT.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书主题失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        var strDNIssuer = JITHTTPCLIENT.GetCertInfo("SC", 1, "");
        ret = JITHTTPCLIENT.GetErrorCode();
        if (ret != 0) {
            message = JITHTTPCLIENT.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书颁发者主题失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        var pubkeyCert = JITHTTPCLIENT.GetCertInfo("SC", 8, "");
        ret = JITHTTPCLIENT.GetErrorCode();
        if (ret != 0) {
            message = JITHTTPCLIENT.GetErrorMessage(ret);
            sxca_ceb.journal.logDebug("主流浏览器VCTK获取公钥证书信息失败，错误码：" + ret + "，错误信息：" + message);
            return ret;
        }
        sxca_ceb.current.setCertInfo(strDN, strDNIssuer, pubkeyCert);
        var cert={};
        cert.strDN = strDN;
        cert.strDNIssuer = strDNIssuer;
        cert.pubkeyCert = pubkeyCert;
        sxca_ceb.current.pushInitCerts(cert);
        return sxca_ceb.current.getCertInfo();
    };
    var getCertInfo = function (chooseType,certSubject) {
        if (sxca_ceb.util.getBrowser() == "IE") {
            return getCertInfoIE(chooseType,certSubject);
        } else {
            return getCertInfoChrome(chooseType,certSubject);
        }
    };
    var getCertInfoByVerIE = function (encData) {
        var certInfo = null;
        var message = "";
        var initParam = sxca_ceb.constant.getValue().ukeyInitParam;
        JITComVCTKEx.Initialize(initParam);

        if (JITComVCTKEx.GetErrorCode() != 0) {
            message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
            sxca_ceb.journal.logDebug("IE浏览器VCTK初始化失败，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
            return;
        }
        var temp_DSign_Check_Result = JITComVCTKEx.VerifyAttachedSign(encData);
        if (JITComVCTKEx.GetErrorCode() != 0) {
            message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取验签结果，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
            JITComVCTKEx.Finalize();
            return;
        } else if (temp_DSign_Check_Result < 0) {
            message = JITComVCTKEx.GetErrorMessage(JITComVCTKEx.GetErrorCode());
            sxca_ceb.journal.logDebug("IE浏览器VCTK获取验签结果，错误码：" + JITComVCTKEx.GetErrorCode() + "，错误信息：" + message);
        } else {
            var versionNumber = JITHTTPCLIENT.GetCertInfo("VS", 3, "");
            var serialNumber = JITHTTPCLIENT.GetCertInfo("VS", 2, "");
            var strDN = JITHTTPCLIENT.GetCertInfo("VS", 0, "");
            var effectiveStartTime = JITHTTPCLIENT.GetCertInfo("VS", 5, "");
            var effectiveEndTime = JITHTTPCLIENT.GetCertInfo("VS", 6, "");
            var strDNIssuer = JITHTTPCLIENT.GetCertInfo("VS", 1, "");
            var email = JITHTTPCLIENT.GetCertInfo("VS", 4, "");
            var userName = JITHTTPCLIENT.GetCertInfo("VS", 9, "");
            var originalText = JITHTTPCLIENT.GetData();
            certInfo = new sxca_ceb.model.CertInfoObj(versionNumber, serialNumber, strDN, effectiveStartTime, effectiveEndTime, strDNIssuer, email, userName, originalText);
        }
        JITComVCTKEx.Finalize();
        return certInfo;
    };
    var getCertInfoByVerChrome = function (encData) {
        var ret;
        var message = '';
        ret = JITHTTPCLIENT.VerifyAttachedSign(encData);
        if (ret != 0) {
            ret = JITHTTPCLIENT.GetErrorCode();
            if (ret != 0) {
                message = JITHTTPCLIENT.GetErrorMessage(ret);
                sxca_ceb.journal.logDebug("主流浏览器VCTK获取证书信息验签失败，错误码：" + ret + "，错误信息：" + message);
            }
            return null;
        } else {
            var versionNumber = JITHTTPCLIENT.GetCertInfo("VS", 3, "");
            var serialNumber = JITHTTPCLIENT.GetCertInfo("VS", 2, "");
            var strDN = JITHTTPCLIENT.GetCertInfo("VS", 0, "");
            var effectiveStartTime = JITHTTPCLIENT.GetCertInfo("VS", 5, "");
            var effectiveEndTime = JITHTTPCLIENT.GetCertInfo("VS", 6, "");
            var strDNIssuer = JITHTTPCLIENT.GetCertInfo("VS", 1, "");
            var email = JITHTTPCLIENT.GetCertInfo("VS", 4, "");
            var userName = JITHTTPCLIENT.GetCertInfo("VS", 9, "");
            var originalText = JITHTTPCLIENT.GetData();
            return new sxca_ceb.model.CertInfoObj(versionNumber, serialNumber, strDN, effectiveStartTime, effectiveEndTime, strDNIssuer, email, userName, originalText);
        }
    };
    var getCertInfoByVer = function (encData) {
        if (sxca_ceb.util.getBrowser() == "IE") {
            return getCertInfoByVerIE(encData);
        } else {
            return getCertInfoByVerChrome(encData);
        }
    };

    return {
        initParams: initParams,
        finalize: finalize,
        getVersion: getVersion,
        attachSign: attachSign,
        getCertInfoList: getCertInfoList,
        getCertInfoListIE: getCertInfoListIE,
        getCertInfoListChrome: getCertInfoListChrome,
        getCertInfo: getCertInfo,
        P1SignBase64Str: P1SignBase64Str
    };
}());
/*****************************************************************
 简单封装第三方应用系统的调用的业务函数，尽量做到可控制的范围内
 *****************************************************************/

sxca_ceb.business = (function () {
    var busMsgObj = function (code, msg, result) {
        this.code = code;//自定义的业务标识
        this.msg = msg; //消息描述
        this.result = result;      //结果数据
    };
    var getCurrentNoComposeSealsNum = function () {
        var imgDivs = sxca_ceb.base.getElementsByClassName("sxca_sealImg", "div");
        return imgDivs.length;
    };
    //拖拽印章
    var initSealDrag = function () {
        var arr = [];
        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
        var point = sxca_ceb.util.getPoint(sealsRange);
        var psnd = point.split(";");
        var _left = parseInt(psnd[0]);
        var _top = parseInt(psnd[1]);
        //获取当前印章索引
        var currentSeal = sealsRange.children[0];
        var currentSealId = currentSeal.getAttribute("flag");
        var sealIndex = -1;


        var region = sxca_ceb.sealUI.getRegion();
        var point2 = sxca_ceb.util.getPoint(region);
        var psnd2 = point2.split(";");
        var _left2 = parseInt(psnd2[0]);
        var _top2 = parseInt(psnd2[1]);

        var x = 0, y = 0,
            ol = parseInt(_left, 10),
            ot = parseInt(_top, 10),
            il = 0,
            it = 0;
        var seal;
        var sealP;
        var sealOper;
        var saveButton;
        var deleteButton;
        var currentItem;
        var currentScrollTopH;
        var currentScrollTopW;
        sxca_ceb.base.addEvent(sealsRange, "dragstart", function (e) {
            // console.log("dragstart")
            if (sxca_ceb.switch.getSealDrag() == 1) {
                //需要验证当前页面的印章个数
                if (getCurrentNoComposeSealsNum() >= sxca_ceb.switch.getCurrentSealSum()) {
                    sxca_ceb.ui._alert("已超过规定的印章数量，请联系管理员！");
                    return;
                }
                seal = sxca_ceb.base.createEle("div");
                sealP = sxca_ceb.base.createEle("div");
                sealOper = sxca_ceb.base.createEle("div");

                sealP.appendChild(seal);
                sealP.appendChild(sealOper);

                x = e.clientX;
                y = e.clientY;
            }else{
                return;
            }

        });
        sxca_ceb.base.getsByClass("sxca-page-box", "div").ons("dragenter", function (index, item, itemList, e) {
            // console.log("dragenter");
            var sealObjArr = sxca_ceb.current.getInitSeals();
            e.preventDefault();
            if (sxca_ceb.switch.getSealDrag() == 1) {
                var currentSeal = sealsRange.children[0];
                var currentSealId = currentSeal.getAttribute("flag");
                for (var i = 0; i < sealObjArr.length; i++) {
                    if (sealObjArr[i].sealId == currentSealId) {
                        sealIndex = i;
                        var sealType = sxca_ceb.current.getSealType();
                        if (sealType && sealType != null && sealType != '') {
                            if (sealType != sealObjArr[i].sealType) {
                                sxca_ceb.ui._alert("本次签署所需印章类型与选中印章的类型不一致");
                            }
                        }
                        var imgWidth = Math.floor(parseInt(sealObjArr[i].sealWidth) / 10 * 39);
                        var imgBoxDivs = sxca_ceb.base.getElementsByClassName("signet-switch-imgBox", "div");
                        var imgBoxWidth = 150,imgBoxHeight = 150;
                        if(imgBoxDivs[0].style && imgBoxDivs[0].style.width != undefined && imgBoxDivs[0].style.width != null && imgBoxDivs[0].style.width != ""){
                            imgBoxWidth = imgBoxDivs[0].style.width.slice(0, -2);
                            imgBoxHeight = imgBoxDivs[0].style.height.slice(0, -2);
                        }else{
                            imgBoxWidth = imgBoxDivs[0].offsetWidth;
                            imgBoxHeight = imgBoxDivs[0].offsetHeight;
                        }
                        il = ol + Math.floor((parseInt(imgBoxWidth) - imgWidth) / 2);
                        var imgHeight = Math.floor(parseInt(sealObjArr[i].sealHeight) / 10 * 39);
                        it = ot + Math.floor((parseInt(imgBoxHeight) - imgHeight) / 2)  ;
                        break;
                    }

                }
            }else{
                return;
            }

        });
        sxca_ceb.base.getsByClass("sxca-page-box", "div").ons("dragover", function (index, item, itemList, e) {
            // console.log("dragover");
            e.preventDefault();
        });
        sxca_ceb.base.getsByClass("sxca-page-box", "div").ons("drop", function (index, item, itemList, e) {
            // console.log("drop");
            if (sxca_ceb.switch.getSealDrag() == 1) {
                if (getCurrentNoComposeSealsNum() >= sxca_ceb.switch.getCurrentSealSum()) {
                    return;
                }
                e.preventDefault();
                var scrollTopH = e.target.parentNode.parentNode.parentNode.scrollTop;
                var scrollTopW = e.target.parentNode.parentNode.parentNode.scrollLeft;
                currentItem = item;
                currentScrollTopH = scrollTopH;
                currentScrollTopW = scrollTopW;
            }else{
                return;
            }

        });
        sxca_ceb.base.addEvent(sealsRange, "dragend", function (e) {
            if (sxca_ceb.switch.getSealDrag() == 1) {
                var sealObjArr = sxca_ceb.current.getInitSeals();
                if (getCurrentNoComposeSealsNum() >= sxca_ceb.switch.getCurrentSealSum()) {
                    return;
                }
                if ((!!currentItem)) {
                    var point = sxca_ceb.util.getPoint(currentItem);
                    var psnd = point.split(";");
                    var item_left = parseInt(psnd[0]);
                    var item_top = parseInt(psnd[1]);
                    var item_width = currentItem.offsetWidth;
                    if(!item_width || item_width == 0){
                        item_width = currentItem.style.width.slice(0, -2);
                    }
                    var item_height = currentItem.offsetHeight;
                    if(!item_height || item_height == 0){
                        item_height = currentItem.style.height.slice(0, -2);
                    }

                    var w = parseInt(item_width, 10),
                        h = parseInt(item_height, 10),
                        l = parseInt(item_left, 10),
                        t = parseInt(item_top, 10);

                    var nl = e.clientX + currentScrollTopW - x + il,//即将落章的左边
                        nt = e.clientY + currentScrollTopH - y + it;//即将落章的上边
                    var sent = {
                        l: l,
                        r: l + w,
                        t: t,
                        b: t + h,
                        n: 10
                    };
                    var mouseX = e.clientX + currentScrollTopW;
                    var mouseY = e.clientY + currentScrollTopH;
                    if (mouseX > l && mouseX < (l + w) && mouseY > t && mouseY < (t + h)) {
                        var pLeft = 0, pTop = 0;
                        var sealWidth = Math.floor(parseInt(sealObjArr[sealIndex].sealWidth) / 10 * 39);
                        if (nl - l < 0) {
                            pLeft = 0;
                        } else if (nl >= l && nl < (l + w)) {
                            // var sealWidth=parseInt(sealObjArr[sealIndex].width);
                            if (nl + sealWidth > (l + w)) {
                                pLeft = w - sealWidth;
                            } else {
                                pLeft = nl - l;
                            }
                        } else {
                            pLeft = w - sealWidth;
                        }
                        var sealHeight = Math.floor(parseInt(sealObjArr[sealIndex].sealHeight) / 10 * 39);
                        if (nt - t < 0) {
                            pTop = 0;
                        } else if (nt > t && nt < (t + h)) {
                            //var sealHeight=parseInt(sealObjArr[sealIndex].height);
                            if (nt + sealHeight > (t + h)) {
                                pTop = h - sealHeight;
                            } else {
                                pTop = nt - t;
                            }
                        } else {
                            pTop = h - sealHeight;
                        }
                        sxca_ceb.sealUI.showSeal(sealP, currentItem, sealObjArr, sealIndex, pLeft, pTop, sent);
                    }
                }
            }else{
                return;
            }
            // console.log("dragend");

        });

    };

    //初始加载电子印章
    var loadSeals = function (infoStr) {//页面加载电子印章
        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
        var signet = sxca_ceb.base.getId("signet_id");
        var sxca_ceb_next2 = sxca_ceb.base.getId("sxca_ceb_next");
        var sxca_ceb_pre2 = sxca_ceb.base.getId("sxca_ceb_pre");
        var signet_tit2 = sxca_ceb.base.getId("signet_tit");
        var busObj = sxca_ceb.chapter.getSealArrayBySyn(infoStr);
        if (busObj && busObj.code == "0" && busObj.result && busObj.result.length > 0) {
            sxca_ceb.current.setInitSealNull();
            sealsRange.innerHTML = "";
            sealObjArr = busObj.result;
            var len = sealObjArr.length;
            for (var i = 0; i < len; i++) {
                sxca_ceb.current.pushInitSeal(sealObjArr[i]);
            }
            var w = Math.floor(parseInt(sealObjArr[0].sealWidth) / 10 * 39);
            var h = Math.floor(parseInt(sealObjArr[0].sealHeight) / 10 * 39);
            sealsRange.innerHTML = '<img src="data:image/jpg;base64,' + sealObjArr[0].sealBase64 + ' " flag=' + sealObjArr[0].sealId + ' width="'+w+'px" height="'+h+'px">';
            signet.innerHTML = "(" + 1 + "/" + len + ")";
            sxca_ceb_next2.style.visibility = "visible";
            sxca_ceb_pre2.style.visibility = "visible";
            signet_tit2.innerHTML = "印章";
            //校对左侧印章显示
            sxca_ceb.sealUI.proofreadPanelLeft()
            return new sxca_ceb.business.busMsgObj("0", "加载电子印章成功", sealObjArr);
        } else {
            sealsRange.innerHTML = '<img src="data:image/png;base64,' + sxca_ceb.constant.getValue().nosealImg + ' " flag=' + (-1) + '>';
            sxca_ceb_next2.style.visibility = "hidden";
            sxca_ceb_pre2.style.visibility = "hidden";
            signet_tit2.innerHTML = "";
            sxca_ceb.ui._alert("未获取到对应的电子印章");
            return new sxca_ceb.business.busMsgObj("1", "加载电子印章失败" + busObj.msg, busObj.msg);
        }
    };
    var loadMultUserSeals = function (infoStr,callback) {//页面加载电子印章
        sxca_ceb.chapter.getMultUserSealArrayByAsyn(infoStr,function(busObj){
            var sealObjArr;
            var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
            var signet = sxca_ceb.base.getId("signet_id");
            var sxca_ceb_next2 = sxca_ceb.base.getId("sxca_ceb_next");
            var sxca_ceb_pre2 = sxca_ceb.base.getId("sxca_ceb_pre");
            var signet_tit2 = sxca_ceb.base.getId("signet_tit");
            if (busObj && busObj.code == "0" && busObj.result && busObj.result.length > 0) {
                sealObjArr = busObj.result;
                sxca_ceb.current.setInitSealNull();
                sealsRange.innerHTML = "";

                var len = sealObjArr.length;
                for (var i = 0; i < len; i++) {
                    sxca_ceb.current.pushInitSeal(sealObjArr[i]);
                }
                var w = Math.floor(parseInt(sealObjArr[0].sealWidth) / 10 * 39);
                var h = Math.floor(parseInt(sealObjArr[0].sealHeight) / 10 * 39);
                sealsRange.innerHTML = '<img src="data:image/jpg;base64,' + sealObjArr[0].sealBase64 + ' " flag=' + sealObjArr[0].sealId + ' width="'+w+'px" height="'+h+'px">';
                signet.innerHTML = "(" + 1 + "/" + len + ")";
                sxca_ceb_next2.style.visibility = "visible";
                sxca_ceb_pre2.style.visibility = "visible";
                signet_tit2.innerHTML = "印章";
                //校对左侧印章显示
                sxca_ceb.sealUI.proofreadPanelLeft()
                if(callback){
                    callback(new sxca_ceb.business.busMsgObj("0", "加载电子印章成功", sealObjArr));
                }
                return;
            } else {
                sealsRange.innerHTML = '<img src="data:image/png;base64,' + sxca_ceb.constant.getValue().nosealImg + ' " flag=' + (-1) + '>';
                sxca_ceb_next2.style.visibility = "hidden";
                sxca_ceb_pre2.style.visibility = "hidden";
                signet_tit2.innerHTML = "";
                signet.innerHTML = "";
                sxca_ceb.ui._alert("加载电子印章失败");
                if(callback){
                    callback(new sxca_ceb.business.busMsgObj("1", "加载电子印章失败", busObj.msg));
                }
                return;
            }
        });
    };
    var loadStaticSeals = function (sealObjArr) {
        var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
        var signet = sxca_ceb.base.getId("signet_id");
        var sxca_ceb_next2 = sxca_ceb.base.getId("sxca_ceb_next");
        var sxca_ceb_pre2 = sxca_ceb.base.getId("sxca_ceb_pre");
        var signet_tit2 = sxca_ceb.base.getId("signet_tit");
        if (sealObjArr && sealObjArr.length > 0) {
            var len = sealObjArr.length;
            for (var i = 0; i < len; i++) {
                sxca_ceb.current.pushInitSeal(sealObjArr[i]);
            }
            var w = Math.floor(parseInt(sealObjArr[0].sealWidth) / 10 * 39);
            var h = Math.floor(parseInt(sealObjArr[0].sealHeight) / 10 * 39);
            sealsRange.innerHTML = '<img src="data:image/jpg;base64,' + sealObjArr[0].sealBase64 + ' " flag=' + sealObjArr[0].sealId + ' width="'+w+'px" height="'+h+'px">';
            signet.innerHTML = "(" + 1 + "/" + len + ")";
            sxca_ceb_next2.style.visibility = "visible";
            sxca_ceb_pre2.style.visibility = "visible";
            signet_tit2.innerHTML = "印章";
            //校对左侧印章显示
            sxca_ceb.sealUI.proofreadPanelLeft()
            return new sxca_ceb.business.busMsgObj("0", "加载电子印章成功", "");
        } else {//没有印章，设置为暂无印章图片
            sealsRange.innerHTML = '<img src="data:image/png;base64,' + sxca_ceb.constant.getValue().nosealImg + ' " flag=' + (-1) + '>';
            sxca_ceb_next2.style.visibility = "hidden";
            sxca_ceb_pre2.style.visibility = "hidden";
            signet_tit2.innerHTML = "";
            sxca_ceb.ui._alert("请联系管理员重置示例章");
            return new sxca_ceb.business.busMsgObj("1", "加载电子印章失败", "");
        }
    };

    var echoStaticSealPosition=function(options){
        var msg = "";
        if(options && options.length > 0){
            var allPage = document.getElementsByClassName("sxca-page-box");
            var sealObjArr = sxca_ceb.current.getInitSeals();
            for (var i = 0; i < options.length; i++) {
                var oldSeal = sxca_ceb.util.json_strToObj(options[i])
                if(oldSeal){
                    var pathName =  oldSeal.pathName;
                    var sealFlag =  oldSeal.sealFlag;
                    if(sealFlag == null || sealFlag == ""){
                        msg+= pathName + "sealFlag为空;"
                        continue;
                    }
                    var sealPage =  oldSeal.sealPage;
                    if(sealPage == null || sealPage == ""){
                        msg+= pathName + "sealPage为空;"
                        continue;
                    }
                    if(sealPage > sxca_ceb.chapter.getCurrentPDFPageCount()){
                        msg+= pathName + "sealPage超出文件页数;"
                        continue;
                    }
                    var sealX =  oldSeal.sealX;
                    if (sealX == null || sealX == "") {
                        msg+= pathName + "sealX为空;"
                        continue;
                    }
                    var sealY =  oldSeal.sealY;
                    if (sealY == null || sealY == "") {
                        msg+= pathName + "sealY为空;"
                        continue;
                    }
                    if (parseInt(sealX) > sxca_ceb.chapter.getCurrentPDFPageWidth()) {
                        msg+= pathName + "signX超出页面范围;"
                        continue;
                    }
                    if (parseInt(sealY) > sxca_ceb.chapter.getCurrentPDFPageHeight()) {
                        msg+= pathName + "signY超出页面范围;"
                        continue;
                    }

                    var sealIndex = -1;
                    for (var j = 0; j < sealObjArr.length; j++) {
                        if (sealObjArr[j].sealId == sealFlag) {
                            sealIndex = j;
                            break;
                        }
                    }
                    var currentItem = allPage[sealPage - 1];
                    var seal = sxca_ceb.base.createEle("div");
                    var sealP = sxca_ceb.base.createEle("div");
                    var sealOper = sxca_ceb.base.createEle("div");

                    sealP.appendChild(seal);
                    sealP.appendChild(sealOper);

                    var point = sxca_ceb.util.getPoint(currentItem);
                    var psnd = point.split(";");
                    var item_left = parseInt(psnd[0]);
                    var item_top = parseInt(psnd[1]);
                    var w = parseInt(currentItem.offsetWidth, 10),
                        h = parseInt(currentItem.offsetHeight, 10),
                        l = parseInt(item_left, 10),
                        t = parseInt(item_top, 10);
                    var sent = {
                        l: l,
                        r: l + w,
                        t: t,
                        b: t + h,
                        n: 10
                    };
                    sxca_ceb.sealUI.showSeal(sealP, currentItem, sealObjArr, sealIndex, sealX, sealY, sent);
                    msg += pathName + "获取固定位置回显成功！";
                }else{
                    return new sxca_ceb.business.busMsgObj("1", "解析固定位置印章回显数据异常！", "");
                }
            }
            return new sxca_ceb.business.busMsgObj("0", msg, "");
        }

    }

    //加载文件
    var loadFile = function (businessId,callback) {
        if (getCurrentNoComposeSealsNum() > 0) {
            sxca_ceb.util.removeAllSeal();
        }
        if (businessId != null && businessId != "" && businessId != undefined) {
            var procbg=sxca_ceb.ui._popupOpen("文件加载中...");
            sxca_ceb.chapter.getFileParamInfoAsyn(businessId,function(obj){
                var ding = 100;
                if (obj && obj.code == "0" && obj.result) {
                    var pageWidth = parseInt(obj.result.width);
                    var pageHeight = parseInt(obj.result.height);
                    var pageCount = parseInt(obj.result.pageCount);
                    sxca_ceb.constant.setCurrentPDFPageCount(pageCount);
                    sxca_ceb.constant.setCurrentPDFPageWidth(pageWidth);
                    sxca_ceb.constant.setCurrentPDFPageHeight(pageHeight);
                    var pagePrefix = obj.result.fileName.split(".")[0];

                    var isfirst = true;
                    var fileInfo = sxca_ceb.current.getFileInfo();
                    if(fileInfo.fileFlag && fileInfo.fileFlag != null && fileInfo.fileFlag != ""){
                        isfirst = false;
                        if(fileInfo.fileFlag != businessId){
                            if(callback){
                                callback(new sxca_ceb.business.busMsgObj("1", "加载不同的文件请刷新浏览器", ""));
                            }
                            return;
                        }
                    }
                    sxca_ceb.current.setFileInfo(businessId, pageWidth, pageHeight, parseInt(obj.result.isSign));
                    if(isfirst){
                        var domId = sxca_ceb.constant.getValue().refreDom;
                        var divPageP = sxca_ceb.base.getId(domId);
                        var address = sxca_ceb.chapter.getLoadFileImgAddress();
                        var sxca_signature_right_list = sxca_ceb.base.getElementsByClassName('sxca-signature-right-list', 'ul');
                        divPageP.innerHTML = "";
                        sxca_signature_right_list[0].style.background = "";
                        sxca_signature_right_list[0].innerHTML = "";
                        //加载原图
                        if (sxca_ceb.switch.getLazyLoad() == 0) {//正常加载
                            for (var i = 0; i < pageCount; i++) {
                                //设置主图
                                var pageDiv = sxca_ceb.base.createEle("div");
                                pageDiv.className = "sxca-page-box";
                                pageDiv.setAttribute("index", i + 1);
                                var img = sxca_ceb.base.createEle("img");
                                img.src = address + "?key=" + pagePrefix + "_" + (ding + i + 1) + "_yt";
                                img.draggable = false;
                                img.style.display = "block";
                                // img.style.width=pageWidth+"px";
                                // img.style.height=pageHeight+"px";
                                pageDiv.appendChild(img);
                                pageDiv.style.width = pageWidth + "px";
                                pageDiv.style.height = pageHeight + "px";
                                divPageP.appendChild(pageDiv);
                                divPageP.style.width = pageWidth + "px";
                            }
                        } else {//懒加载
                            for (var i = 0; i < pageCount; i++) {
                                //设置主图
                                var pageDiv = sxca_ceb.base.createEle("div");
                                pageDiv.className = "sxca-page-box";
                                pageDiv.id = sxca_ceb.util.getCurrentTime();
                                pageDiv.setAttribute("index", i + 1);
                                var img = sxca_ceb.base.createEle("img");
                                if (i == 0) {
                                    img.setAttribute("lazy", "loaded");
                                    img.setAttribute("data-url", address + "?key=" + pagePrefix + "_" + (ding + i + 1) + "_yt");
                                    img.src = address + "?key=" + pagePrefix + "_" + (ding + i + 1) + "_yt";
                                } else {
                                    img.setAttribute("lazy", "loading");
                                    img.setAttribute("data-url", address + "?key=" + pagePrefix + "_" + (ding + i + 1) + "_yt");
                                    img.src = "";
                                }
                                img.draggable = false;
                                img.style.display = "block";
                                // img.style.width=pageWidth+"px";
                                // img.style.height=pageHeight+"px";
                                pageDiv.appendChild(img);
                                pageDiv.style.width = pageWidth + "px";
                                pageDiv.style.height = pageHeight + "px";
                                divPageP.appendChild(pageDiv);
                                divPageP.style.width = pageWidth + "px";
                            }
                        }
                        //加载缩略图
                        for (var i = 0; i < pageCount; i++) {
                            //设置缩略图
                            var pageLi = sxca_ceb.base.createEle("li");
                            if (i == 0) {
                                pageLi.className = "active";
                            }
                            var slDiv = sxca_ceb.base.createEle("div");
                            slDiv.className = "sxca-docItem";
                            slDiv.style.background = "url(" + address + "?key=" + pagePrefix + "_" + (ding + i + 1) + "_sl) center center / 100% no-repeat";
                            slDiv.style.width = Math.round(pageWidth * 0.17) + "px";
                            slDiv.style.height = Math.round(pageHeight * 0.17) + "px";
                            if(Math.round(pageWidth * 0.17) > 200){
                                slDiv.style.width = 200 + "px";
                                slDiv.style.height = Math.round(pageHeight * 200 / pageWidth) + "px";
                            }
                            var slSpan = sxca_ceb.base.createEle("span");
                            slSpan.className = "sxca-bottom-nubmer";
                            slSpan.innerHTML = "" + (i + 1) + "/" + pageCount;
                            pageLi.appendChild(slDiv);
                            pageLi.appendChild(slSpan);
                            sxca_signature_right_list[0].appendChild(pageLi);
                        }
                        //初始化电子签章拖拽事件，这个是在加载文件完成之后进行加载，防止绑定元素不存在，（重复加载文件会导致事件绑定多次，不能重复加载）
                        sxca_ceb.business.initSealDrag();
                        //文件加载完成后绑定滚动事件
                        sxca_ceb.sealUI.pagescroll();
                    }else{
                        var allPage = document.getElementsByClassName("sxca-page-box");
                        for (var j = 0; j < allPage.length; j++) {
                            var item = allPage[j];
                            var index = parseInt(item.getAttribute("index"));
                            var sxca_docItem = sxca_ceb.base.getElementsByClassName('sxca-docItem', 'div');
                            var oldZtUrl = item.children[0].getAttribute("data-url");
                            var oldSlUrl = sxca_docItem[index - 1].style.background;

                            var in01 = oldZtUrl.indexOf("=");
                            var middle01 = oldZtUrl.substring(0, in01);
                            var newZtUrl = middle01 + '=' + pagePrefix + '_' + (100 + index) + '_yt';
                            if(sxca_ceb.switch.getLazyLoad() == 0){
                                item.children[0].src = newZtUrl;
                            }else{
                                item.children[0].setAttribute("data-url", newZtUrl);
                                var lazy = item.children[0].lazy;
                                if(lazy == "loaded"){
                                    item.children[0].src = newZtUrl;
                                }
                            }
                            var in03 = oldSlUrl.indexOf("=");
                            var middle03 = oldSlUrl.substring(0, in03);
                            var middle05 = oldSlUrl.substring(in03);
                            var in04 = middle05.indexOf(")");
                            var middle04 = middle05.substring(in04);
                            var newSlUrl = middle03 + '=' + pagePrefix + '_' + (100 + index) + '_sl"' + middle04;
                            sxca_docItem[index - 1].style.background = newSlUrl;

                            //在添加虚拟框之前先判定当前页下面有没有虚拟框，如果有则删除
                            var itemChilds = item.children;
                            if (itemChilds.length > 0) {
                                for (var i = itemChilds.length - 1; i >= 0; i--) {
                                    if (itemChilds[i].tagName == 'IMG') {//排除当前页的img对象(文件图片)
                                        continue;
                                    } else {
                                        item.removeChild(itemChilds[i]);
                                    }
                                }
                            }
                        }
                    }


                    // var item = sxca_ceb.base.getElementsByClassName('sxca-page-box', 'div')[0];
                    // //在加载文件后对第一页添加虚框
                    // if (parseInt(obj.result.isSign) == 1) {
                    //     sxca_ceb.chapter.loadVerifyInfoAsyn(businessId,function(loadBusObj){
                    //         if (loadBusObj && loadBusObj.code == "0") {
                    //             var signCertResultObj = loadBusObj.result;
                    //             sxca_ceb.current.setCertSeals(signCertResultObj);
                    //             if (signCertResultObj) {
                    //                 var verList = signCertResultObj.verifyList;
                    //                 var verRes;
                    //                 if (verList && verList.length > 0) {
                    //                     for (var i = 0; i < verList.length; i++) {
                    //                         if (parseInt(verList[i].currentPage) == 1) {
                    //                             verRes = verList[i];
                    //                             break;
                    //                         }
                    //                     }
                    //                     if (verRes) {
                    //                         sxca_ceb.sealUI.loadComposeSealEvent(verRes.perVerifyRes, item, 1);
                    //                         sxca_ceb.ui._popupClose(procbg);
                    //                     }
                    //                 }
                    //             }
                    //             sxca_ceb.ui._popupClose(procbg);
                    //         }else{
                    //             sxca_ceb.ui._popupClose(procbg);
                    //         }
                    //     });
                    // }else{
                    //     sxca_ceb.ui._popupClose(procbg);
                    // }
                    sxca_ceb.ui._popupClose(procbg);
                    if(callback){
                        callback(new sxca_ceb.business.busMsgObj("0", "文件加载成功", ""));
                    }
                    return;
                }else{
                    sxca_ceb.ui._popupClose(procbg);
                    sxca_ceb.ui._alert("文件加载失败，请联系管理员");
                    if(callback){
                        callback(new sxca_ceb.business.busMsgObj("1", "文件加载失败，" + obj.msg, ""));
                    }
                    return;
                }
            });
        } else {
            sxca_ceb.journal.logInfo("根据文档标识打开文档", "打开文件", "请输入文档标识，再进行打开文件操作");
            sxca_ceb.ui._alert("文档标识不能为空");
            if(callback){
                callback(new sxca_ceb.business.busMsgObj("1", "文档标识不能为空", ""));
            }
            return;
        }
    };


    //设置文件参数
    var setSealParamInfo = function (page, x, y) {
            if (page) {
                if (isNaN(parseInt(page)) ||typeof parseInt(page) != "number") {
                    sxca_ceb.ui._alert("page：请传入数字");
                    return new sxca_ceb.business.busMsgObj("1", "签章业务请传入数字", "");
                }
            } else {
                sxca_ceb.ui._alert("page：不能为空");
                return new sxca_ceb.business.busMsgObj("1", "签章页码不能为空", "");
            }
            if (x) {
                if (isNaN(parseInt(x)) ||typeof parseInt(x) != "number") {
                    sxca_ceb.ui._alert("x：请传入数字");
                    return new sxca_ceb.business.busMsgObj("1", "签章坐标X请传入数字", "");
                }
            } else {
                sxca_ceb.ui._alert("x：不能为空");
                return new sxca_ceb.business.busMsgObj("1", "签章坐标X不能为空", "");
            }
            if (y) {
                if (isNaN(parseInt(y)) ||typeof parseInt(y) != "number") {
                    sxca_ceb.ui._alert("y：请传入数字");
                    return new sxca_ceb.business.busMsgObj("1", "签章坐标Y请传入数字", "");
                }
            } else {
                sxca_ceb.ui._alert("y：不能为空");
                return new sxca_ceb.business.busMsgObj("1", "签章坐标Y不能为空", "");
            }
            sxca_ceb.current.setSealParam(page, x, y);

    };

    var saveSignHandle = function (callback){
        var noComposeSealsNum = getCurrentNoComposeSealsNum();
        if (noComposeSealsNum > 0) {
            var procbg=sxca_ceb.ui._popupOpen("批量保存电子签章中...");
            var sealImgs = document.getElementsByClassName("sxca_sealImg");
            var ids = [];
            for (var j = 0; j < sealImgs.length; j++) {//根据id中的时间进行排序
                ids.push(sealImgs[j].id.substr(9));
            }
            for (var j = 0; j < ids.length; j++) {
                for (var k = j + 1; k < ids.length; k++) {
                    if (ids[j] > ids[k]) {
                        var tem = ids[j];
                        ids[j] = ids[k];
                        ids[k] = tem;
                    }
                }
            }
            var strArr = [];
            var sealIds = [];
            var initSeals = sxca_ceb.current.getInitSeals();
            for (var j = 0; j < ids.length; j++) {//进行循环保存
                var sealImg = document.getElementById(sxca_ceb.constant.getValue().sealImgId + ids[j]);
                sealIds.push(sxca_ceb.constant.getValue().sealImgId + ids[j]);
                var sealId = sealImg.getAttribute("sealflag");
                var signX = parseInt(sealImg.style.left);
                var signY = parseInt(sealImg.style.top);
                var currentPageNo = sealImg.parentNode.getAttribute("index");
                var fileInfo = sxca_ceb.current.getFileInfo();
                var sealObject = new sxca_ceb.trans.SealObj(sealId, signX, signY, fileInfo.fileFlag, currentPageNo);
                sealObject.signType = "dragSign";
                if (j == ids.length - 1) {
                    sealObject.isLast = 1;
                } else {
                    sealObject.isLast = 0;
                }
                var signRule = sxca_ceb.util.json_objToStr(sealObject);
                strArr.push(signRule);
            }
            sxca_ceb.chapter.getFileHashAndSignCert(0,strArr.length, strArr,sealIds, procbg, function(obj){
                if(obj && obj.code != "0"){
                    sxca_ceb.current.setReturnCertSealsNull();
                    var fileInfo = sxca_ceb.current.getFileInfo();
                    sxca_ceb.business.loadFile(fileInfo.fileFlag);
                }
                callback(obj);
                return;
            });
        }else{
            sxca_ceb.ui._alert("不存在待保存的印章")
            callback(new busMsgObj("1", "不存在待保存的印章，操作无效", ""));
            return;
        }
    };
    var setSealType = function (type) {
        if (type) {
            sxca_ceb.current.setSealType(type);
            return new busMsgObj("0", "印章类型设置成功", "");
        }else{
            sxca_ceb.ui._alert("type：不能为空");
            return new busMsgObj("1", "印章类型不能为空", "");
        }
    }
    var printmeFile = function () {
        var com = confirm("确认将此文档进行打印吗？");
        if (com == true) {
            var newWindow = window.open("", "_blank");
            var allPage = document.getElementsByClassName("sxca-page-box");
            // var oldStr = document.getElementById('sxca_ceb_middle').innerHTML;
            var allPageId= [];
            for (var j = 0; j < allPage.length; j++) {
                var item = allPage[j];
                allPageId[j] = item.id;
                // var width = item.style.width;
                // var height = item.style.height.replace('px', '')
                // if (height > width) {
                //     height = parseInt(height) - 2;
                // } else {
                //     height = parseInt(height) - 1;
                // }
                // item.setAttribute("style", "width:" + width + ";height:" + height + "px")

                if (sxca_ceb.switch.getLazyLoad() == 1) {
                    //文件图懒加载
                    var isLoad = item.children[0].getAttribute("lazy");
                    if(isLoad == "loading"){
                        item.children[0].src = item.children[0].getAttribute("data-url");//懒加载
                        item.children[0].setAttribute("lazy", "loaded");
                    }
                }
            }
            var newstr = document.getElementById('sxca_ceb_middle').innerHTML;
            // document.getElementById('sxca_ceb_middle').innerHTML = oldStr;
            newWindow.document.write("<html><head></head><title>打印合同窗口</title>" +
                "<link href=\"css/sxca_ceb.css\" rel=\"stylesheet\"></head><body>"
                + newstr +
                "<script type='text/javascript'>" +
                "   var flag = 0;" +
                "   var box = '"+allPageId+"';" +
                "   var boxs = box.split(',');" +
                "   for (var i = 0; i < boxs.length; i++) {" +
                "      var img = document.getElementById(boxs[i]).children[0];" +
                "      img.onload = function() {" +
                "           flag++;" +
                "           if(flag == boxs.length){" +
                "              window.print();" +
                "           }" +
                "      }" +
                "   }" +
                "</script>"+
                "</body></html>");
            newWindow.document.close();
            return new busMsgObj("0", "调用打印成功", "");
        }else{
            return new busMsgObj("1", "调用打印失败", "");
        }
    };
    var fileIsSign = function () {
        var fileInfo = sxca_ceb.current.getFileInfo();
        if (fileInfo && fileInfo.fileFlag && fileInfo.fileFlag != null && fileInfo.fileFlag != "") {
            return new sxca_ceb.business.busMsgObj("0", "查询文件是否签章成功", fileInfo.isSign);
        } else {
            return new sxca_ceb.business.busMsgObj("1", "查询文件是否签章失败，文件不存在", "");
        }
    };
    var getCoordinatePosition = function () {
        var coordinatePositionBoxes = sxca_ceb.base.getId("coordinate-position-boxes");
        if (coordinatePositionBoxes != undefined) {
            var positionBoxes = coordinatePositionBoxes.children;
            if (positionBoxes != undefined && positionBoxes.length > 0) {
                var resObjArr = [];
                for (var i = 0; i < positionBoxes.length; i++) {
                    var perPosition = positionBoxes[i];
                    var resObj = {};
                    var res = perPosition.innerHTML.replaceAll("<br>", "").replaceAll("<span>", "").replaceAll("</span>", "").replaceAll("<b>", "").replaceAll("</b>", "");
                    var resArr = res.split(';');
                    resObj.sealId = resArr[0].split(':')[1];
                    resObj.page = resArr[1].split(':')[1];
                    resObj.x = resArr[2].split(':')[1].split(',')[0];
                    resObj.y = resArr[2].split(':')[1].split(',')[1];
                    resObjArr.push(resObj);
                }
                return new sxca_ceb.business.busMsgObj("0", "获取签章定位信息成功", resObjArr);
            } else {
                return new sxca_ceb.business.busMsgObj("1", "当前未拖拽印章，不存在定位信息", "");
            }
        }
    };
    var loadCerts = function () {
        //单个证书进行签章时此处进行强制弹出
        var certInfo = jit_ceb.business.getCertInfo(0,"");
        if (certInfo) {
            return new sxca_ceb.business.busMsgObj("0", "加载单个Ukey证书成功，之后的操作将使用此证书", "");
        }else{
            return new sxca_ceb.business.busMsgObj("1", "加载单个Ukey证书失败", "");
        }

    };
    var loadMultUserCerts = function (infoStr, callback) {
        var certSubjectStr = sxca_ceb.current.getCertSubjectStr();
        if(certSubjectStr && certSubjectStr != null && certSubjectStr != ""){
            var certSubjectArr = certSubjectStr.split('#');
            if(certSubjectArr && certSubjectArr != null && certSubjectArr != ""){
                getCertSign(0,certSubjectArr.length,certSubjectArr,infoStr,callback);
                return;
            }
        }else{
            var currentCertDnDiv = sxca_ceb.base.getId("current-cert-dn");
            if(currentCertDnDiv){
                currentCertDnDiv.innerHTML = "";
            }
            if(callback){
                callback(new sxca_ceb.business.busMsgObj("1", "未获取到证书列表","" ));
            }
            return;
        }
    };

    var getCertSign = function (i,legth,certSubjectArr,infoStr,callback) {
        var currentCertDnDiv = sxca_ceb.base.getId("current-cert-dn");
        if(i == legth) {
            if(currentCertDnDiv){
                currentCertDnDiv.innerHTML = "提示：U-key对应PIN码已全部验证成功！";
            }
            loadMultUserSeals(infoStr,callback);
            return;
        }else {
            if(currentCertDnDiv){
                currentCertDnDiv.innerHTML = certSubjectArr[i].substring(certSubjectArr[i].indexOf('CN=')+3,certSubjectArr[i].indexOf(','));
            }
            setTimeout(function (){
                var res = jit_ceb.business.getCertInfo(1,certSubjectArr[i]);
                if(typeof res != "object") {
                    var certCN = certSubjectArr[i].substring(certSubjectArr[i].indexOf('CN=') + 3, certSubjectArr[i].indexOf(','));
                    if(currentCertDnDiv) {
                        currentCertDnDiv.innerHTML = certCN + "(此证书验证PIN码失败,请点击刷新!)";
                    }
                    if(callback){
                        callback(new sxca_ceb.business.busMsgObj("1", "验证证书失败，"+ certCN + "此证书验证PIN码失败","" ));
                    }
                    return;
                }else {
                    i++;
                    getCertSign(i,legth,certSubjectArr,infoStr,callback);
                }
            },100);
        }
    }
    var getCurrentCertDN=function (){
        var sealObjArr = sxca_ceb.current.getInitSeals();
        if(sealObjArr && sealObjArr.length > 0){
            var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
            var currentSeal = sealsRange.children[0];
            var currentSealId = currentSeal.getAttribute("flag");
            var certDN = "";
            for (var j = 0; j < sealObjArr.length; j++) {
                if (sealObjArr[j].sealId == currentSealId) {
                    certDN = sealObjArr[j].certSubject;
                    break;
                }
            }
            if(certDN && certDN != null && certDN != ""){
                return new sxca_ceb.business.busMsgObj("0", "获取证书主题信息成功", certDN);
            }else{
                return new sxca_ceb.business.busMsgObj("1", "获取证书主题信息失败", "");
            }
        }else{
            return new sxca_ceb.business.busMsgObj("1", "获取证书主题信息失败，当前未选择证书", "");
        }
    };
    var getCurrentSealName=function (){
        var sealObjArr = sxca_ceb.current.getInitSeals();
        if(sealObjArr && sealObjArr.length > 0){
            var sealsRange = sxca_ceb.base.getId("sxca_ceb_seals_load");
            var currentSeal = sealsRange.children[0];
            var currentSealId = currentSeal.getAttribute("flag");
            var sealName = "";
            for (var j = 0; j < sealObjArr.length; j++) {
                if (sealObjArr[j].sealId == currentSealId) {
                    sealName = sealObjArr[j].sealName;
                    break;
                }
            }
            if(sealName && sealName != null && sealName != ""){
                return new sxca_ceb.business.busMsgObj("0", "获取印章名称信息成功", sealName);
            }else{
                return new sxca_ceb.business.busMsgObj("1", "获取印章名称信息失败", "");
            }
        }else{
            return new sxca_ceb.business.busMsgObj("1", "获取印章名称信息失败，当前不存在印章信息", "");
        }
    };
    var getVctkVersion=function (){
        var result = jit_ceb.business.getVersion();
        if (result != undefined && result != null) {
            var versionArr = result.split('.');
            if (parseInt(versionArr[2]) > 10) {
                return new busMsgObj("0", "当前控件可正常使用"+result, "");
            } else if (parseInt(versionArr[2]) == 10) {
                if (parseInt(versionArr[3]) > 8) {
                    return new busMsgObj("0", "当前控件可正常使用"+result, "");
                } else if (parseInt(versionArr[3]) == 8) {
                    var agent = navigator.userAgent.toLowerCase();
                    if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
                        return new busMsgObj("0", "当前控件可正常使用"+result, "");
                    } else {
                        return new busMsgObj("1", "控件"+result+"不是最新版本，请升级，<a href='https://www.sxccol.com/epm-sxccolweb/portal/AboutUs?to=2-2-3' target='_blank' style='font-size:16px'>点击此处</a>下载【密钥管家】或者【山西CA焦炭修复工具】，并进行环境修复", "");
                    }
                } else {
                    return new busMsgObj("1", "控件"+result+"非最新版本，请升级，<a href='https://www.sxccol.com/epm-sxccolweb/portal/AboutUs?to=2-2-3' target='_blank' style='font-size:16px'>点击此处</a>下载【密钥管家】或者【山西CA焦炭修复工具】，并进行环境修复", "");
                }
            } else {
                return new busMsgObj("1", "控件非最新版本，请升级，<a href='https://www.sxccol.com/epm-sxccolweb/portal/AboutUs?to=2-2-3' target='_blank' style='font-size:16px'>点击此处</a>下载【密钥管家】或者【山西CA焦炭修复工具】，并进行环境修复", "");
            }
        } else {
            return new busMsgObj("1", "获取控件信息失败，请重新安装最新控件，<a href='https://www.sxccol.com/epm-sxccolweb/portal/AboutUs?to=2-2-3' target='_blank' style='font-size:16px'>点击此处</a>下载【密钥管家】或者【山西CA焦炭修复工具】，并进行环境修复", "");
        }
    };
    var getAllCertList = function () {
        jit_ceb.business.finalize();
        jit_ceb.business.initParams();
        var certInfoArr;
        if (sxca_ceb.util.getBrowser() == "IE") {
            certInfoArr = jit_ceb.business.getCertInfoListIE();
        } else {
            certInfoArr = jit_ceb.business.getCertInfoListChrome();
        }
        if(certInfoArr && certInfoArr.length >0){
            for (var i = 0; i < certInfoArr.length; i++) {
                var cert = certInfoArr[i];
                var dn = cert.dn;
                var notAfter = cert.notAfter;
                console.log("【" + cert.certtype + "证书" + "】" + "-" + "【" + cert.sn + "】" + dn + "-------" + cert.type+ "-------" + notAfter)
                var time = parseInt((new Date(notAfter).getTime() - new Date().getTime())/(24*3600*1000));
                certInfoArr[i].name = dn.substring(dn.indexOf('CN=') + 3, dn.indexOf(','));
                certInfoArr[i].notAfter = notAfter.substring(0,notAfter.indexOf(" "));
            }
        }
        return certInfoArr;
    };
    return {
        busMsgObj: busMsgObj,
        getVctkVersion: getVctkVersion,
        getAllCertList: getAllCertList,
        loadCerts: loadCerts,
        loadMultUserCerts: loadMultUserCerts,
        loadSeals: loadSeals,
        loadFile: loadFile,
        loadMultUserSeals: loadMultUserSeals,
        loadStaticSeals: loadStaticSeals,
        echoStaticSealPosition: echoStaticSealPosition,
        getCurrentCertDN: getCurrentCertDN,
        getCurrentSealName: getCurrentSealName,
        getCurrentNoComposeSealsNum: getCurrentNoComposeSealsNum,
        initSealDrag: initSealDrag,
        setSealParamInfo: setSealParamInfo,
        printmeFile: printmeFile,
        fileIsSign: fileIsSign,
        setSealType: setSealType,
        getCoordinatePosition: getCoordinatePosition,
        saveSignHandle: saveSignHandle,
    };
}());



